🐞 fix(shop): 修改商店可买次数限制

This commit is contained in:
dingchaolin
2023-03-08 14:07:48 +08:00
parent 0fc6e2c4bc
commit 25da5d4c41
2 changed files with 1 additions and 20 deletions

View File

@@ -72,13 +72,10 @@ export class ShopHandler {
}
// 总计可买次数(从配置表读取)
const totalCanBuyTimes = getShopMaxBuyTimes(dicShopItem.price);
const totalCanBuyTimes = dicShopItem.purchaseLimit;
if (!totalCanBuyTimes || totalCanBuyTimes <= 0) {
return resResult(STATUS.BATTLE_CONSUMES_NOT_ENOUGH);
}
// 最大已买次数 = 总计可买次数 - 本次要买次数
const maxAlreadyBuyTimes = totalCanBuyTimes - count;
// 消耗
let cost = getShopPrice(dicShopItem.money, count, userShop?.count||0, dicShopItem.price);