活动:弹出礼包
This commit is contained in:
@@ -4,7 +4,7 @@ import Role, { RoleModel, RoleType } from '../db/Role'
|
||||
import { getLvByExp, getExpByLv, gameData, getDicApByLv } from '../pubUtils/data';
|
||||
import { updateUserInfo } from './redisService';
|
||||
// import { switchOnFunc } from './funcSwitchService';
|
||||
import { FUNC_OPT_TYPE, TASK_TYPE, WAR_TYPE, STATUS, KING_EXP_RATIO_TYPE, ITEM_CHANGE_REASON } from '../consts';
|
||||
import { FUNC_OPT_TYPE, TASK_TYPE, WAR_TYPE, STATUS, KING_EXP_RATIO_TYPE, ITEM_CHANGE_REASON, POP_UP_SHOP_CONDITION_TYPE } from '../consts';
|
||||
import { BackendSession, pinus } from 'pinus';
|
||||
import { REDIS_KEY } from '../consts';
|
||||
import { Rank } from './rankService';
|
||||
@@ -16,6 +16,7 @@ import { resResult } from '../pubUtils/util';
|
||||
import { LineupParam } from '../domain/rank';
|
||||
import { WarStar } from '../domain/dbGeneral';
|
||||
import { uniq } from 'underscore';
|
||||
import { checkPopUpCondition } from './activity/popUpShopService';
|
||||
|
||||
export async function roleLevelup(type: KING_EXP_RATIO_TYPE, roleId: string, kingExp: number = 0, session: BackendSession) {
|
||||
const serverId = session.get('serverId');
|
||||
@@ -47,6 +48,8 @@ export async function roleLevelup(type: KING_EXP_RATIO_TYPE, roleId: string, kin
|
||||
await checkTask(roleId, session.get('sid'), TASK_TYPE.ROLE_LV, newLv, false, {});
|
||||
//成长任务
|
||||
await checkActivityTask(serverId, session.get('sid'), roleId, TASK_TYPE.ROLE_LV, newLv);
|
||||
// 弹出礼包
|
||||
await checkPopUpCondition(serverId, roleId, POP_UP_SHOP_CONDITION_TYPE.LV_TO, { oldLv: lv, newLv })
|
||||
|
||||
}
|
||||
let actordata: { lv: number, exp: number, getExp: number, mostExp: number }[] = [];
|
||||
|
||||
Reference in New Issue
Block a user