活动:刷新商店添加玩家等级条件筛选
This commit is contained in:
@@ -28,7 +28,8 @@ export async function getRefreshShopActivity(serverId: number, roleId: string) {
|
||||
|
||||
let playerRecord: ActivityRefreshShopModelType = await ActivityRefreshShopModel.findData(activityData.activityId, roleId, playerData.roundIndex);
|
||||
if (!playerRecord) {//生成商店可购买商品的数据
|
||||
let randomGoods = playerData.randomGoodsItems();
|
||||
let { lv } = await RoleModel.findByRoleId(roleId);
|
||||
let randomGoods = playerData.randomGoodsItems(lv);
|
||||
playerRecord = await ActivityRefreshShopModel.createShop(activityData.activityId, roleId, playerData.roundIndex, randomGoods);
|
||||
}
|
||||
playerData.setPlayerRecords(playerRecord);
|
||||
@@ -49,7 +50,8 @@ export async function getPlayerRefreshShopData(activityId: number, serverId: num
|
||||
|
||||
let playerRecord: ActivityRefreshShopModelType = await ActivityRefreshShopModel.findData(activityId, roleId, playerData.roundIndex);
|
||||
if (!playerRecord) {//生成商店可购买商品的数据
|
||||
let randomGoods = playerData.randomGoodsItems();
|
||||
let { lv } = await RoleModel.findByRoleId(roleId);
|
||||
let randomGoods = playerData.randomGoodsItems(lv);
|
||||
playerRecord = await ActivityRefreshShopModel.createShop(activityData.activityId, roleId, playerData.roundIndex, randomGoods);
|
||||
}
|
||||
playerData.setPlayerRecords(playerRecord);
|
||||
@@ -70,7 +72,8 @@ export async function getPlayerRefreshShopDataByRoundIndex(activityId: number, s
|
||||
playerData.roundIndex = roundIndex;
|
||||
let playerRecord: ActivityRefreshShopModelType = await ActivityRefreshShopModel.findData(activityId, roleId, playerData.roundIndex);
|
||||
if (!playerRecord) {//生成商店可购买商品的数据
|
||||
let randomGoods = playerData.randomGoodsItems();
|
||||
let { lv } = await RoleModel.findByRoleId(roleId);
|
||||
let randomGoods = playerData.randomGoodsItems(lv);
|
||||
playerRecord = await ActivityRefreshShopModel.createShop(activityData.activityId, roleId, playerData.roundIndex, randomGoods);
|
||||
}
|
||||
playerData.setPlayerRecords(playerRecord);
|
||||
|
||||
Reference in New Issue
Block a user