diff --git a/logic/service/player/player.go b/logic/service/player/player.go index f12a6be6..5f66f583 100644 --- a/logic/service/player/player.go +++ b/logic/service/player/player.go @@ -56,20 +56,13 @@ func (o *OgrePetInfo) GetLevel() int { } // handleNPCFightSpecial 处理NPC战斗特殊情况 -func (o *OgrePetInfo) HandleNPCFightSpecial(v int) { - - npcPetID := int(o.ID) - if o.Ext != 0 { - npcPetID = int(o.Ext) - } else { - if v == 0 { - o.IsCapture = 0 - return - - } +func (o *OgrePetInfo) HandleNPCFightSpecial(can int) { + if can == 0 && o.Ext != 0 { + o.IsCapture = 0 + return } - petCfg, ok := xmlres.PetMAP[npcPetID] + petCfg, ok := xmlres.PetMAP[o.GetID()] if !ok { o.IsCapture = 0