diff --git a/logic/service/player/Monster.go b/logic/service/player/Monster.go index 18ffc36e7..db85648e2 100644 --- a/logic/service/player/Monster.go +++ b/logic/service/player/Monster.go @@ -59,32 +59,35 @@ func (p *Player) GenMonster() { if !ok { continue } - v := ogreconfig[grand.Intn(len(ogreconfig))] - if !p.IsMatch(*v.Event) { - continue - } + for _, v := range ogreconfig { - p.Data[i] = OgrePetInfo{} - p.Data[i].ID = uint32(v.RefreshID[grand.Intn(len(v.RefreshID))]) + if !p.IsMatch(*v.Event) { + continue + } - if p.Data[i].ID != 0 { + p.Data[i] = OgrePetInfo{} + p.Data[i].ID = uint32(v.RefreshID[grand.Intn(len(v.RefreshID))]) - p.Data[i].Lv = uint32(grand.N(v.MinLevel, v.MaxLevel)) + if p.Data[i].ID != 0 { - if len(v.RefreshID) == 1 { //说明这里只固定刷一个,概率变尼尔尼奥,不是稀有精灵 + p.Data[i].Lv = uint32(grand.N(v.MinLevel, v.MaxLevel)) + + if len(v.RefreshID) == 1 { //说明这里只固定刷一个,概率变尼尔尼奥,不是稀有精灵 + + nieo := grand.Meet(20, 1000) + if nieo { + p.Data[i].Ext = 77 + if grand.Meet(1, 2) { + p.Data[i].Ext = 416 + } - nieo := grand.Meet(20, 1000) - if nieo { - p.Data[i].Ext = 77 - if grand.Meet(1, 2) { - p.Data[i].Ext = 416 } } + p.Data[i].HandleNPCFightSpecial(v.IsCapture) + break } - p.Data[i].HandleNPCFightSpecial(v.IsCapture) - } }