fix(fight): 修正空变更导致的潜在逻辑问题
This commit is contained in:
@@ -7,6 +7,8 @@ import (
|
||||
"blazing/logic/service/player"
|
||||
"blazing/modules/blazing/model"
|
||||
"blazing/modules/blazing/service"
|
||||
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
func (h Controller) PetFusion(data *pet.C2S_PetFusion, c *player.Player) (result *pet.PetFusionInfo, err errorcode.ErrorCode) {
|
||||
@@ -50,7 +52,10 @@ func (h Controller) PetFusion(data *pet.C2S_PetFusion, c *player.Player) (result
|
||||
}
|
||||
|
||||
effect := int(service.NewPetFusionMaterialService().Data(data.Item1))
|
||||
r := model.GenPetInfo(resid, -1, int(natureId), effect, -1, 1)
|
||||
dv1 := decimal.NewFromInt(2).Div(decimal.NewFromInt(3)).Mul(decimal.NewFromInt(int64(Mcatchpetinfo.Dv)))
|
||||
dv2 := decimal.NewFromInt(1).Div(decimal.NewFromInt(3)).Mul(decimal.NewFromInt(int64(Auxpetinfo.Dv)))
|
||||
dv := dv1.Add(dv2).Add(decimal.NewFromInt(1)).IntPart()
|
||||
r := model.GenPetInfo(resid, int(dv), int(natureId), effect, -1, 1)
|
||||
c.Service.Pet.PetAdd(*r)
|
||||
c.Pet_del(Auxpetinfo.CatchTime)
|
||||
c.Pet_del(Mcatchpetinfo.CatchTime)
|
||||
|
||||
Reference in New Issue
Block a user