feat: 为OgrePetInfo添加GetID方法
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-02-26 19:22:04 +08:00
committed by cnb
parent fcba504618
commit de297c9904
2 changed files with 8 additions and 4 deletions

View File

@@ -134,12 +134,9 @@ func (Controller) OnPlayerFightNpcMonster(data1 *fight.FightNpcMonsterInboundInf
return nil, errorcode.ErrorCodes.ErrPokemonNotExists
}
if refPet.Ext != 0 {
refPet.ID = refPet.Ext
}
monster := model.GenPetInfo(
int(refPet.ID), -1,
int(refPet.GetID()), -1,
-1,
0, //野怪没特性

View File

@@ -39,6 +39,13 @@ type OgrePetInfo struct {
IsCapture int `struc:"skip"`
}
func (o *OgrePetInfo) GetID() int {
if o.Ext != 0 {
return int(o.Ext)
}
return int(o.ID)
}
func (o *OgrePetInfo) FixSHiny() {
var co *data.GlowFilter
if o.Ext == 0 {