商店:添加名将擂台限制
This commit is contained in:
@@ -12,6 +12,7 @@ import { DicShop } from "../pubUtils/dictionary/DicShop";
|
||||
import { BackendSession } from "pinus";
|
||||
import { ActivityModelType } from "../db/Activity";
|
||||
import { addItems } from "./role/rewardService";
|
||||
import { LadderMatchModel } from "../db/LadderMatch";
|
||||
|
||||
export async function getAllShopList(roleId: string, serverId: number) {
|
||||
let userShopRecs = await UserShopModel.findByRoleId(roleId);
|
||||
@@ -157,7 +158,12 @@ export async function checkShopItemCanBuy(activityId: number, shopItemId: number
|
||||
return STATUS.LV_LIMIT;
|
||||
}
|
||||
}
|
||||
|
||||
if(dicShopItem.ranklimit) {
|
||||
let ladder = await LadderMatchModel.findByRoleId(roleId);
|
||||
if(ladder.historyRank < dicShopItem.ranklimit) {
|
||||
return STATUS.LADDER_LV_LIMIT;
|
||||
}
|
||||
}
|
||||
if(dicShopItem.purchaseLimit != -1) {
|
||||
if(vipStartTime > 0 && dicShopItem.vipPurchaseLimit != -1) {
|
||||
if(buyCount + count > dicShopItem.purchaseLimit + dicShopItem.vipPurchaseLimit) {
|
||||
|
||||
Reference in New Issue
Block a user