refactor: 将物品和货币相关字段从uint32改为int64以支持更大数值范围
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:
@@ -38,12 +38,12 @@ func (h Controller) PetEVDiy(data *pet.PetEV, c *player.Player) (result *pet.S2C
|
||||
|
||||
usedEV := lo.Sum(data.EVs[:]) - lo.Sum(currentPet.Ev[:])
|
||||
// 加的比池子还多
|
||||
if usedEV > c.Info.EVPool {
|
||||
if int64(usedEV) > c.Info.EVPool {
|
||||
return nil, errorcode.ErrorCodes.Err10401
|
||||
}
|
||||
currentPet.Ev = data.EVs
|
||||
currentPet.CalculatePetPane(false)
|
||||
c.Info.EVPool -= usedEV
|
||||
c.Info.EVPool -= int64(usedEV)
|
||||
|
||||
result = &pet.S2C_50001{}
|
||||
result.UseEV = usedEV
|
||||
|
||||
Reference in New Issue
Block a user