活动:月卡权限
This commit is contained in:
@@ -9,6 +9,7 @@ import * as dicParam from '../../../pubUtils/dicParam';
|
||||
import { DungeonFirstModel } from '../../../db/DungeonFirst';
|
||||
import { DungeonResultParam } from '../../../domain/battleField/dungeon';
|
||||
import { DEBUG_MAGIC_WORD, ITEM_CHANGE_REASON } from '../../../consts';
|
||||
import { getVipDungeonCnt } from '../../../services/activity/monthlyTicketService';
|
||||
|
||||
export default function(app: Application) {
|
||||
return new DungeonBattleHandler(app);
|
||||
@@ -41,10 +42,6 @@ export class DungeonBattleHandler {
|
||||
}
|
||||
|
||||
let timesCanBuy = dicParam.DUNGEON_CONST.DUNGEON_CONST_BUY;
|
||||
let { vLv } = await RoleModel.findByRoleId(roleId);
|
||||
if(vLv > 0) {
|
||||
timesCanBuy += 0; // 暂留,用于处理vip等级增加最大购买次数
|
||||
}
|
||||
if(dungeonBuyCnt + count > timesCanBuy ) {
|
||||
return resResult(STATUS.DUNGEON_REFRESH_TIMES_LACK)
|
||||
}
|
||||
@@ -60,10 +57,11 @@ export class DungeonBattleHandler {
|
||||
await RoleModel.buyCnt(roleId, needRefresh, count, curTime);
|
||||
|
||||
let nextCostGold = getDungeonBuyCountCost(dungeonBuyCnt + count + 1);
|
||||
let freeCount = getVipDungeonCnt(session.get('vipStartTime'));
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
costGold: buyCost,
|
||||
nextCostGold,
|
||||
battleCount: dicParam.DUNGEON_CONST.DUNGEON_CONST_FREE + dungeonBuyCnt + count - dungeonCnt,
|
||||
battleCount: freeCount + dungeonBuyCnt + count - dungeonCnt,
|
||||
buyCount: dicParam.DUNGEON_CONST.DUNGEON_CONST_BUY - dungeonBuyCnt - count
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user