寻宝:战力限制

This commit is contained in:
luying
2021-08-23 15:25:39 +08:00
parent bd14b34d2d
commit 7bc1e3b4e7
4 changed files with 8 additions and 5 deletions

View File

@@ -61,8 +61,12 @@ export class ComBattleHandler {
if (!enoughBlueprt) return resResult(STATUS.COM_BATTLE_BLUEPRT_NOT_ENOUGH);
const roleInfo = await RoleModel.findByRoleId(roleId, null, true);
const { lv } = roleInfo;
const { lv, topLineupCe } = roleInfo;
if (lv < COM_BTL_CONST.ENABLE_LV) return resResult(STATUS.COM_BATTLE_LV_NOT_ENOUGH);
if(ceLimit && ceLimit > topLineupCe * (1 + COM_BTL_CONST.ROBOT_CE_RATIO)) {
return resResult(STATUS.COM_BATTLE_CREATE_CE_LIMIT)
}
let channelService = this.app.get('channelService');
let channel = channelService.getChannel(teamCode, true);