fix bug 远征关卡最后一关获取失败

This commit is contained in:
luying
2020-11-20 16:49:55 +08:00
parent b304dee798
commit d9e1bc2bcb
3 changed files with 10 additions and 5 deletions

View File

@@ -8,7 +8,6 @@ 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, battleStatus: number) {
@@ -46,7 +45,6 @@ export async function findOrCreateEnemies(roleId: string, myCe: number, expediti
let {enemiesCurHpAp, enemies} = expeditionWarRecord;
for(let enemy of enemies) {
let cur = {"hp": 0, "ap": 0};
console.log(enemiesCurHpAp)
let getHp = enemiesCurHpAp && enemiesCurHpAp.find(cur => cur.dataId == enemy.dataId);
if(getHp) {
cur.hp = getHp.hp;