添加远征匹配玩家方法

This commit is contained in:
luying
2020-10-28 19:29:59 +08:00
parent 3377e0f99c
commit 222b9c6e12
11 changed files with 282 additions and 27 deletions

View File

@@ -3,7 +3,7 @@ import { BattleRecordModel } from '../../../db/BattleRecord';
import { BattleSweepRecordModel } from '../../../db/BattleSweepRecord';
import { getWarById, } from '../../../pubUtils/gamedata';
import { genCode } from '../../../pubUtils/util';
import { WAR_TYPE } from '../../../consts/consts';
import { WAR_TYPE, EVENT_STATUS } from '../../../consts/consts';
import { checkDaily, checkDailyAndIncrease } from '../../../services/dailyBattleService';
import { checkTowerWar, towerBattleEnd } from '../../../services/battleService';
import { WarReward } from '../../../services/warRewardService';
@@ -70,7 +70,8 @@ export class NormalBattleHandler {
towerData = Object.assign(towerData, checkResult.data);
} else if (warInfo.warType == WAR_TYPE.EVENT) {
// 记录事件状态
let checkResult = await checkEventBattle( roleId, session.get('eventStatus'), battleId, battleCode);
let eventStatus = session.get('eventStatus')||EVENT_STATUS.WAITING;
let checkResult = await checkEventBattle( roleId, eventStatus, battleId, battleCode);
if(checkResult.status == -1) {
return checkResult.resResult
}