fix bug 远征显示下一关等
This commit is contained in:
@@ -8,8 +8,9 @@ import { decodeStr, resResult, setLocalHours, shouldRefresh } from '../pubUtils/
|
||||
import { WAR_JSON_ATTRIBUTE_TYPE, EXPEDITION_CONST } from '../consts/consts';
|
||||
import Actor from '../pubUtils/actor';
|
||||
import { ExpeditionWarRecordModel } from '../db/ExpeditionWarRecord';
|
||||
import { stat } from 'fs';
|
||||
|
||||
export async function findOrCreateEnemies(roleId: string, myCe: number, expeditionCode: string, expeditionId: number) {
|
||||
export async function findOrCreateEnemies(roleId: string, myCe: number, expeditionCode: string, expeditionId: number, battleStatus: number) {
|
||||
|
||||
let expeditionWarRecord = await ExpeditionWarRecordModel.getRecordByCodeAndId(expeditionCode, expeditionId);
|
||||
if(!expeditionWarRecord) { // 如果没有信息
|
||||
@@ -35,7 +36,7 @@ export async function findOrCreateEnemies(roleId: string, myCe: number, expediti
|
||||
// 保存
|
||||
let {warId} = curDicExpedition;
|
||||
expeditionWarRecord = await ExpeditionWarRecordModel.saveRecord(expeditionCode, expeditionId, {
|
||||
roleId, battleId: warId, ...enemyObj
|
||||
roleId, battleId: warId, ...enemyObj, battleStatus
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user