修改猫咪宝藏数值为四舍五入
This commit is contained in:
parent
34099258a7
commit
7a04463517
@ -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) // 开始游戏
|
||||
|
||||
@ -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))
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user