寻宝:寻宝如果掉线之后再连接会没有反应
This commit is contained in:
@@ -15,7 +15,7 @@ import { RoleStatus, ComBattleTeamModel, ComBattleTeamType, BossHp, ComRoleStatu
|
||||
import { ItemModel, ItemType } from '../../../db/Item';
|
||||
import { addItems, handleCost } from '../../../services/role/rewardService';
|
||||
import { checkRoleInQueue, rmRoleFromQueue, setTeamSearchReq } from '../../../services/redisService';
|
||||
import { getRandBlueprtId, clearComBtlTimer, getFrd, updateRobotHurtByTime, comBtlLvInvalid, clearRobotHurtTimer, setDismissTimer, dismissTeam, handleComBtlProgress, getComBattleFriendAdd, teammateInBlackList, blueprtIdValid, hasEnoughBlueprt, addRoleToTeam, addRoleStToTeam, addValidSearchingRoles, validToJoin, addRobotsToTeam, addRobotsLater, teamIsFullToStart, oneTeamNotInBlack, getAllAssistCnt, checkHasMyTeam } from '../../../services/comBattleService';
|
||||
import { getRandBlueprtId, clearComBtlTimer, getFrd, updateRobotHurtByTime, comBtlLvInvalid, clearRobotHurtTimer, setDismissTimer, dismissTeam, handleComBtlProgress, getComBattleFriendAdd, teammateInBlackList, blueprtIdValid, hasEnoughBlueprt, addRoleToTeam, addRoleStToTeam, addValidSearchingRoles, validToJoin, addRobotsToTeam, addRobotsLater, teamIsFullToStart, oneTeamNotInBlack, getAllAssistCnt, checkHasMyTeam, checkTeamStatusAndSend } from '../../../services/comBattleService';
|
||||
import { setAp } from '../../../services/actionPointService';
|
||||
import { roleLevelup } from '../../../services/normalBattleService';
|
||||
import { getSimpleRoleInfo } from '../../../services/roleService';
|
||||
@@ -26,7 +26,7 @@ import { FriendParams } from '../../../domain/roleField/friend';
|
||||
import { checkTask, checkTaskInComBattleStart } from '../../../services/task/taskService';
|
||||
import { gameData, getWarByBlueprtId } from '../../../pubUtils/data';
|
||||
import { HeroModel } from '../../../db/Hero';
|
||||
import { addUserToTeamChannel, delTeamChannel, removeFromTeamChannel, sendMessageToTeam } from '../../../services/pushService';
|
||||
import { addUserToTeamChannel, delTeamChannel, removeFromTeamChannel, sendMessageToTeam, sendMessageToUsersWithSuc, sendMessageToUserWithSuc } from '../../../services/pushService';
|
||||
|
||||
export default function(app: Application) {
|
||||
return new ComBattleHandler(app);
|
||||
@@ -449,12 +449,17 @@ export class ComBattleHandler {
|
||||
*/
|
||||
async action(msg: {teamCode: string, bossHurts: Array<{hid: number, dataId: number, hurtHp: number}>, killed: number[], curRnd: number}, session: BackendSession) {
|
||||
let roleId = session.get('roleId');
|
||||
let sid = session.get('sid');
|
||||
let { teamCode, killed, bossHurts, curRnd } = msg;
|
||||
let teamStatus = this.teamMap.get(teamCode);
|
||||
if (!teamStatus || !teamStatus.roleIds || teamStatus.roleIds.indexOf(roleId) === -1) {
|
||||
checkTeamStatusAndSend(teamCode, roleId, sid);
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
if (teamStatus.status !== COM_TEAM_STATUS.FIGHTING) return resResult(STATUS.COM_BATTLE_NOT_START);
|
||||
if (teamStatus.status !== COM_TEAM_STATUS.FIGHTING) {
|
||||
checkTeamStatusAndSend(teamCode, roleId, sid);
|
||||
return resResult(STATUS.COM_BATTLE_NOT_START);
|
||||
}
|
||||
for (let st of teamStatus.roleStatus) {
|
||||
if (st.roleId === roleId && (!st.heroes || st.heroes.length === 0)) {
|
||||
return resResult(STATUS.SUCCESS);
|
||||
|
||||
Reference in New Issue
Block a user