远征:添加随机地图buff
This commit is contained in:
@@ -94,7 +94,7 @@ export class ExpeditionBattleHandler {
|
||||
if (!curExpeditionWarRecord) {
|
||||
return resResult(STATUS.EXPEDITION_MATCH_NO_PLAYER);
|
||||
}
|
||||
let { battleId, enemyFrom, enemies, battleStatus, ce: curCe } = curExpeditionWarRecord;
|
||||
let { battleId, mapseid, enemyFrom, enemies, battleStatus, ce: curCe } = curExpeditionWarRecord;
|
||||
let nextCe = 0; // 下一关战力
|
||||
|
||||
if (gameData.expedition.has(expeditionId + 1)) {
|
||||
@@ -103,7 +103,7 @@ export class ExpeditionBattleHandler {
|
||||
}
|
||||
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
expeditionCode, expeditionId, battleId,
|
||||
expeditionCode, expeditionId, battleId, mapseid,
|
||||
battleStatus,
|
||||
enemyFrom,
|
||||
enemies,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ExpeditionPointModel } from '../db/ExpeditionPoint';
|
||||
import Role, { RoleModel, RoleType } from '../db/Role';
|
||||
import { PvpDefenseModel } from '../db/PvpDefense';
|
||||
|
||||
import { shouldRefresh, calculateSumCE } from '../pubUtils/util';
|
||||
import { shouldRefresh, calculateSumCE, getRandSingleEelm } from '../pubUtils/util';
|
||||
import { EXPEDITION_CONST, LINEUP_NUM, EXPEDITION_WAR_RECORD_STATUS, ABI_TYPE } from '../consts';
|
||||
import { ExpeditionWarRecordModel } from '../db/ExpeditionWarRecord';
|
||||
import { HeroType } from '../db/Hero';
|
||||
@@ -88,9 +88,10 @@ export async function findOrCreateEnemies(roleId: string, myCe: number, expediti
|
||||
}
|
||||
if(flag) {
|
||||
// 保存
|
||||
let {warId} = curDicExpedition;
|
||||
let { warId } = curDicExpedition;
|
||||
let { mapseid } = gameData.war.get(warId);
|
||||
expeditionWarRecord = await ExpeditionWarRecordModel.saveRecord(expeditionCode, expeditionId, {
|
||||
roleId, battleId: warId, ...enemyObj, battleStatus
|
||||
roleId, battleId: warId, mapseid: getRandSingleEelm(mapseid), ...enemyObj, battleStatus
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user