From b39dea32bba7bb5d95df3f279b70964d15bfa86f Mon Sep 17 00:00:00 2001 From: luying Date: Wed, 18 May 2022 13:19:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A3=85=E5=A4=87=EF=BC=9A=E5=A4=A9=E6=99=B6?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E9=9A=8F=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/role/rewardService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game-server/app/services/role/rewardService.ts b/game-server/app/services/role/rewardService.ts index d81f3b4e2..755377405 100644 --- a/game-server/app/services/role/rewardService.ts +++ b/game-server/app/services/role/rewardService.ts @@ -421,11 +421,11 @@ export function getJewelRandSe(id: number, seid: number) { let planPool = gameData.randomEffectPoolPlan.get(dicRandom.planId); if(planPool && planPool.length > 0) { let result = getRandEelmWithWeight(planPool); - if(result) rand = result.dic.num; + if(result) rand = Math.round(result.dic.num * 100)/100; } else { let randResult = getRandValueByMinMax(dicRandom.Min, dicRandom.Max, getDecimalCnt(dicRandom.gap)); let n = Math.floor((randResult - dicRandom.Min)/dicRandom.gap); - rand = dicRandom.Min + n * dicRandom.gap; + rand = Math.round(dicRandom.Min + n * dicRandom.gap * 100)/100; } return new RandSe(id, dicRandom.id, rand); }