寻宝:战斗结束清理机器人攻击计时器
This commit is contained in:
@@ -17,7 +17,7 @@ import { ItemModel } from '../../../db/Item';
|
||||
import { handleFixedReward, addItems, handleCost } from '../../../services/rewardService';
|
||||
import { checkRoleInQueue, getTeamSearchByQuality, rmRoleFromQueue, setTeamSearchReq } from '../../../services/redisService';
|
||||
import { transBossHpArr } from '../../../services/battleService';
|
||||
import { getRandBlueprtId, getRandComBtlRobots, checkComBattleResult, clearComBtlTimer, getRealReward, getAssistTimesByQuality, getFrd, updateRobotHurt, updateRobotHurtByTime, comBtlLvInvalid } from '../../../services/comBattleService';
|
||||
import { getRandBlueprtId, getRandComBtlRobots, checkComBattleResult, clearComBtlTimer, getRealReward, getAssistTimesByQuality, getFrd, updateRobotHurt, updateRobotHurtByTime, comBtlLvInvalid, clearRobotHurtTimer } from '../../../services/comBattleService';
|
||||
import { setAp } from '../../../services/actionPointService';
|
||||
import { roleLevelup } from '../../../services/normalBattleService';
|
||||
|
||||
@@ -538,6 +538,7 @@ export class ComBattleHandler {
|
||||
setTimeout(async () => {
|
||||
let teamStatus = thiz.teamMap.get(teamCode);
|
||||
if (teamStatus && teamStatus.status === COM_TEAM_STATUS.FIGHTING) {
|
||||
clearRobotHurtTimer(teamStatus, this.robotHurtTimer);
|
||||
let channelService = thiz.app.get('channelService');
|
||||
let channel = channelService.getChannel(teamCode, false);
|
||||
let team = await ComBattleTeamModel.syncTeamData({teamCode, status: COM_TEAM_STATUS.LOOSE, roleStatus: teamStatus.roleStatus, bossHpArr: teamStatus.bossHpArr});
|
||||
@@ -548,7 +549,7 @@ export class ComBattleHandler {
|
||||
}, COM_BTL_CONST.BTL_TIME_LMT);
|
||||
teamStatus.roleStatus.forEach((st, idx) => {
|
||||
if (st.isRobot === true) {
|
||||
updateRobotHurtByTime(teamStatus, st, COM_BTL_CONST.ROBOT_BASE_TIME_INTERVAL + idx, channel);
|
||||
updateRobotHurtByTime(teamStatus, st, COM_BTL_CONST.ROBOT_BASE_TIME_INTERVAL + idx, channel, this.robotHurtTimer);
|
||||
}
|
||||
});
|
||||
return resResult(STATUS.SUCCESS);
|
||||
@@ -682,6 +683,7 @@ export class ComBattleHandler {
|
||||
let { teamCode } = msg;
|
||||
let team = await ComBattleTeamModel.getTeamByCode(teamCode);
|
||||
if (!team || team.status !== COM_TEAM_STATUS.WIN) return resResult(STATUS.COM_BATTLE_REWARD_ERR);
|
||||
clearRobotHurtTimer(team, this.robotHurtTimer);
|
||||
let { roleStatus, blueprtId, status, bossHpArr } = team;
|
||||
let roleSt: RoleStatus = null;
|
||||
roleStatus.forEach(st => {
|
||||
|
||||
Reference in New Issue
Block a user