修改猫咪宝藏数值为四舍五入

This commit is contained in:
hahwu 2026-03-30 11:23:42 +08:00
parent 34099258a7
commit 7a04463517
2 changed files with 2 additions and 2 deletions

View File

@ -856,7 +856,7 @@ func (ad *GameLogic) RegisterNetWorkFunc() {
RegisterMsgProcessFunc("ReqPlayroomGuide", ReqPlayroomGuide) // 展示游戏结果数据
RegisterMsgProcessFunc("ReqPetFur", ReqPetFur) // 宠物毛皮信息
RegisterMsgProcessFunc("ReqPetFurBuy", ReqPetFurBuy) // 宠物毛皮商店购买
RegisterMsgProcessFunc("ReqFurSet", ReqFurSet) //宠物毛皮设置
RegisterMsgProcessFunc("ReqFurSet", ReqFurSet) // 宠物毛皮设置
// 宠物宝藏
RegisterMsgProcessFunc("ReqFriendTreasure", ReqFriendTreasure) // 请求好友宝藏数据
RegisterMsgProcessFunc("ReqFriendTreasureStart", ReqFriendTreasureStart) // 开始游戏

View File

@ -3498,7 +3498,7 @@ func ReqPlayroomInfo(player *Player, buf []byte) error {
PlayroomMod.SetGameId(playroom.GAME_TYPE_FILP)
addNumFunc := func(num int) int {
factor := player.GetOrderFactor()
return int(float64(num)*float64(factor)/100) / 100 * 100
return int(math.Round(float64(num)*float64(factor)/100)) / 100 * 100
}
PlayroomMod.SetGameRewardFlip(addNumFunc(100), addNumFunc(500), addNumFunc(2000))
}