refactor(decimal): 替换shopspring/decimal为govalues/decimal库

This commit is contained in:
1
2025-12-04 14:28:42 +00:00
parent b1748d1428
commit 022dc12461
81 changed files with 89 additions and 87 deletions

View File

@@ -8,7 +8,7 @@ import (
"blazing/modules/blazing/model"
"blazing/modules/blazing/service"
"github.com/shopspring/decimal"
"github.com/govalues/decimal"
)
func (h Controller) PetFusion(data *pet.C2S_PetFusion, c *player.Player) (result *pet.PetFusionInfo, err errorcode.ErrorCode) {
@@ -52,7 +52,7 @@ func (h Controller) PetFusion(data *pet.C2S_PetFusion, c *player.Player) (result
}
effect := int(service.NewPetFusionMaterialService().Data(data.Item1))
dv1 := decimal.NewFromInt(2).Div(decimal.NewFromInt(3)).Mul(decimal.NewFromInt(int64(Mcatchpetinfo.Dv)))
dv1 := decimal.newf(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)