refactor: 简化NPC战斗特殊情况的处理逻辑
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user