远征:添加随机地图buff

This commit is contained in:
luying
2021-08-30 15:44:49 +08:00
parent 3321871961
commit 4078508505
4 changed files with 16 additions and 9 deletions
@@ -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
});
}
}