Merge branch 'feature/pay_for_diamond' into dev

This commit is contained in:
chenkai 2023-12-22 20:13:43 +08:00
commit df6927b8ff

View File

@ -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) 之间