fix: 修正宠物面板计算参数

This commit is contained in:
xinian
2026-03-23 22:00:05 +08:00
committed by cnb
parent 705eb31007
commit 09d58c1f14
11 changed files with 418 additions and 76 deletions

View File

@@ -66,7 +66,7 @@ func (h Controller) UsePetItemOutOfFight(data *item.C2S_USE_PET_ITEM_OUT_OF_FIGH
c.Service.Item.UPDATE(uint32(data.ItemID), -1)
result = &item.S2C_USE_PET_ITEM_OUT_OF_FIGHT{}
currentPet.CalculatePetPane(false)
currentPet.CalculatePetPane(100)
copier.Copy(&result, currentPet)
// defer c.Service.Info.Save(*c.Info)
return result, 0
@@ -140,7 +140,7 @@ func (h Controller) ResetNature(data *item.C2S_PET_RESET_NATURE, c *player.Playe
}
currentPet.Nature = data.Nature
currentPet.CalculatePetPane(false)
currentPet.CalculatePetPane(100)
c.Service.Item.UPDATE(data.ItemId, -1)
return result, 0
}

View File

@@ -37,7 +37,7 @@ func (h Controller) PetELV(data *C2S_PET_EVOLVTION, c *player.Player) (result *f
currentPet.ID = uint32(xmlres.EVOLVMAP[flag].Branches[data.Index-1].MonTo)
currentPet.Update(true)
currentPet.CalculatePetPane(false)
currentPet.CalculatePetPane(100)
currentPet.Update(true)
updateOutbound := &info.PetUpdateOutboundInfo{}

View File

@@ -43,7 +43,7 @@ func (h Controller) PetEVDiy(data *PetEV, c *player.Player) (result *fight.NullO
return nil, errorcode.ErrorCodes.Err10401
}
currentPet.Ev = data.EVs
currentPet.CalculatePetPane(false)
currentPet.CalculatePetPane(100)
c.Info.EVPool -= int64(usedEV)
// result = &pet.S2C_50001{}