From 55bb294b54ccadf463b03320235db1775674be5e Mon Sep 17 00:00:00 2001 From: luying Date: Sun, 24 Apr 2022 12:20:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A9=E6=99=B6=E9=9A=8F=E6=9C=BA=EF=BC=9A?= =?UTF-8?q?=E6=81=A2=E5=A4=8D=E4=B8=BA=E5=B7=A6=E9=97=AD=E5=8F=B3=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/role/rewardService.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/game-server/app/services/role/rewardService.ts b/game-server/app/services/role/rewardService.ts index b786eaefa..ecfb61f1e 100644 --- a/game-server/app/services/role/rewardService.ts +++ b/game-server/app/services/role/rewardService.ts @@ -418,12 +418,16 @@ export async function getAddJewelInfo(roleId: string, roleName: string, jewel: { */ export function getJewelRandSe(id: number, seid: number) { let dicRandom = gameData.randomEffectPool.get(seid) + // console.log('#### dicRandom', dicRandom) let rand = 0; if (dicRandom.id > 0) { let randRange = getRandEelmWithWeight(dicRandom.rate); + // console.log('#### randRange', randRange) let randResult = getRandValueByMinMax(randRange.dic.min, randRange.dic.max, getDecimalCnt(dicRandom.gap)); - let n = Math.ceil((randResult - dicRandom.Min)/dicRandom.gap); + // console.log('#### randResult', randResult) + let n = Math.floor((randResult - dicRandom.Min)/dicRandom.gap); rand = dicRandom.Min + n * dicRandom.gap; + // console.log('#### n', n, rand) } return new RandSe(id, dicRandom.id, rand); }