From bcca0ebbab8f43799f5d2d1bcaa329a6216a3658 Mon Sep 17 00:00:00 2001 From: chenkai Date: Fri, 22 Dec 2023 20:13:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E6=80=BB=E9=A2=9D=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/payForDiamond/ApiReceive.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api_s2c/event/payForDiamond/ApiReceive.ts b/src/api_s2c/event/payForDiamond/ApiReceive.ts index 6165737..32cc9cb 100644 --- a/src/api_s2c/event/payForDiamond/ApiReceive.ts +++ b/src/api_s2c/event/payForDiamond/ApiReceive.ts @@ -23,7 +23,7 @@ function randomWithWeight(groups: diamondWeightGroup[]) { if (!maxAmount) { maxAmount = group.numrange[1]; } else { - maxAmount = Math.min(maxAmount, group.numrange[1]); + maxAmount = Math.max(maxAmount, group.numrange[1]); } } const randomValue = Math.random() * totalWeights; // 随机值落在[0, totalWeights) 之间