寻宝:boss 血量深拷贝

This commit is contained in:
liangtongchuan
2021-01-22 16:35:02 +08:00
parent 3c100b6ae8
commit 1011cd3ef9
3 changed files with 4 additions and 1 deletions

View File

@@ -606,6 +606,7 @@ export class ComBattleHandler {
let res = await decreaseItems(teamStatus.capId, sid, [{id: teamStatus.blueprtId, count: 1}]);
if (res === true) return resResult(STATUS.COM_BATTLE_BLUEPRT_NOT_ENOUGH);
}
clearRobotHurtTimer(teamStatus, this.robotHurtTimer);
channel.pushMessage('onTeamComplete', resResult(STATUS.SUCCESS, {teamCode, result}));
this.teamMap.delete(teamCode);
}

View File

@@ -12,6 +12,7 @@ import { HangUpSpdUpRecModel } from '../db/HangUpSpdUpRec';
import { TowerTaskRecModel } from '../db/TowerTaskRec';
import { setRank } from './redisService';
import { RankParam } from '../pubUtils/interface';
import { cloneDeep } from 'lodash';
export async function checkTowerWar(roleId: string, battleId: number, heroes: Array<number>) {
const battleIdStr = `${battleId}`;
@@ -386,5 +387,5 @@ export function transBossHpArr(source: Array<{dataId: number, hp: number, actorI
let { hp } = elem;
desArr.push(Object.assign(elem, {curHp: hp}));
});
return desArr;
return cloneDeep(desArr);
}

View File

@@ -19,6 +19,7 @@
"@types/bluebird": "^3.5.19",
"@types/chai": "^4.2.14",
"@types/crc": "^3.4.0",
"@types/lodash": "^4.14.168",
"@types/mocha": "^8.2.0",
"@types/mongoose": "^5.7.36",
"@types/node": "8.10.54",