fix: limit booster pack purchases to a max quantity of 100 #1189
@ -367,6 +367,11 @@ const handleBoosterPackPurchase = async (
|
||||
BoosterPackItems: "",
|
||||
InventoryChanges: {}
|
||||
};
|
||||
if (quantity > 100) {
|
||||
throw new Error(
|
||||
"attempt to roll over 100 booster packs in a single go. possible but unlikely to be desirable for the user or the server."
|
||||
);
|
||||
}
|
||||
for (let i = 0; i != quantity; ++i) {
|
||||
for (const weights of pack.rarityWeightsPerRoll) {
|
||||
const result = getRandomWeightedRewardUc(pack.components, weights);
|
||||
|
Loading…
x
Reference in New Issue
Block a user