feat: 为OgrePetInfo添加GetID方法
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:
@@ -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, //野怪没特性
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user