Merge branch 'feature/pay_for_diamond' into dev
This commit is contained in:
commit
df6927b8ff
@ -23,7 +23,7 @@ function randomWithWeight(groups: diamondWeightGroup[]) {
|
|||||||
if (!maxAmount) {
|
if (!maxAmount) {
|
||||||
maxAmount = group.numrange[1];
|
maxAmount = group.numrange[1];
|
||||||
} else {
|
} else {
|
||||||
maxAmount = Math.min(maxAmount, group.numrange[1]);
|
maxAmount = Math.max(maxAmount, group.numrange[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const randomValue = Math.random() * totalWeights; // 随机值落在[0, totalWeights) 之间
|
const randomValue = Math.random() * totalWeights; // 随机值落在[0, totalWeights) 之间
|
||||||
|
Loading…
Reference in New Issue
Block a user