refactor: 简化NPC战斗特殊情况的处理逻辑
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-02-27 15:01:02 +08:00
committed by cnb
parent 8dec37a474
commit 2292de332f

View File

@@ -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