练兵场:fix压制成功战报

This commit is contained in:
luying
2021-04-09 17:49:57 +08:00
parent f1b5867a5d
commit 65006bb89c
3 changed files with 10 additions and 6 deletions

View File

@@ -19,7 +19,7 @@ import { checkRoleInQueue, rmRoleFromQueue, setTeamSearchReq } from '../../../se
import { getRandBlueprtId, clearComBtlTimer, getAssistTimesByQuality, getFrd, updateRobotHurtByTime, comBtlLvInvalid, clearRobotHurtTimer, setDismissTimer, dismissTeam, incEquipPrintDrop, randEquipPrintId, handleComBtlProgress, getComBattleFriendAdd, teammateInBlackList, blueprtIdValid, createComTeamData, hasEnoughBlueprt, addRoleToTeam, addRoleStToTeam, addValidSearchingRoles, validToJoin, addRobotsToTeam, addRobotsLater, teamIsFullToStart, oneTeamNotInBlack } from '../../../services/comBattleService'; import { getRandBlueprtId, clearComBtlTimer, getAssistTimesByQuality, getFrd, updateRobotHurtByTime, comBtlLvInvalid, clearRobotHurtTimer, setDismissTimer, dismissTeam, incEquipPrintDrop, randEquipPrintId, handleComBtlProgress, getComBattleFriendAdd, teammateInBlackList, blueprtIdValid, createComTeamData, hasEnoughBlueprt, addRoleToTeam, addRoleStToTeam, addValidSearchingRoles, validToJoin, addRobotsToTeam, addRobotsLater, teamIsFullToStart, oneTeamNotInBlack } from '../../../services/comBattleService';
import { setAp } from '../../../services/actionPointService'; import { setAp } from '../../../services/actionPointService';
import { roleLevelup } from '../../../services/normalBattleService'; import { roleLevelup } from '../../../services/normalBattleService';
import { addUserToChannel } from '../../../services/roleService'; import { addUserToChannel, getSimpleRoleInfo } from '../../../services/roleService';
import { ChannelUser } from '../../../domain/ChannelUser'; import { ChannelUser } from '../../../domain/ChannelUser';
import { pushComBtlTeamMsg, pushFriendTeamInviteMsg, pushNormalItemMsg, pushTeamInviteMsg } from '../../../services/chatService'; import { pushComBtlTeamMsg, pushFriendTeamInviteMsg, pushNormalItemMsg, pushTeamInviteMsg } from '../../../services/chatService';
import { EXTERIOR } from '../../../pubUtils/dicParam'; import { EXTERIOR } from '../../../pubUtils/dicParam';
@@ -694,7 +694,9 @@ export class ComBattleHandler {
const { teamCode, targetRoleId } = msg; const { teamCode, targetRoleId } = msg;
const msgData = await pushFriendTeamInviteMsg(roleId, roleName, teamCode, targetRoleId); const msgData = await pushFriendTeamInviteMsg(roleId, roleName, teamCode, targetRoleId);
if (!msgData) return resResult(STATUS.WRONG_PARMS); if (!msgData) return resResult(STATUS.WRONG_PARMS);
return resResult(STATUS.SUCCESS, msgData); const roleInfo = await getSimpleRoleInfo(targetRoleId);
return resResult(STATUS.SUCCESS, {...msgData, roleInfo});
} }
/** /**

View File

@@ -235,11 +235,13 @@ export class GuildTrainHandler {
} }
let progress = instance.progress; let progress = instance.progress;
guildTrain = await GuildTrainModel.updateGuildTrainProgress(code, trainId, hid, progress, ranks, isComplete); guildTrain = await GuildTrainModel.updateGuildTrainProgress(code, trainId, hid, progress, ranks, isComplete);
//type 1失败 2成功3表示系统战报即被成功压制
reports.push({ type: 3, time:nowSeconds(), score: addScore, roleName, trainId, hid, difficulty: battleRecord.record.difficulty });
pushGuildTrainSucMsg(roleId, roleName, code, hid);
if (needLockNext) { if (needLockNext) {
//type 1失败 2成功3表示系统战报即被成功压制
reports.push({ type: 3, time:nowSeconds(), score: addScore, roleName, trainId, hid, difficulty: battleRecord.record.difficulty });
guildTrain = await unlockTrain(code, trainId + 1); guildTrain = await unlockTrain(code, trainId + 1);
pushGuildTrainSucMsg(roleId, roleName, code, hid);
} }
res.releaseCallback();//解锁 res.releaseCallback();//解锁
} else { } else {

View File

@@ -9,6 +9,6 @@
}, },
{ {
"id": 3, "id": 3,
"str": "军团据点%d被压制成功对应试炼宝藏已成功开启,请各位成为前往领取奖励" "str": "军团据点%d被压制成功对应据点宝藏已成功开启,请各位成为前往领取奖励"
} }
] ]