🐞 fix(gvg): 激战期推送相关修改

This commit is contained in:
luying
2023-02-23 22:04:54 +08:00
parent 5a85d6e86c
commit 724b0ee485
11 changed files with 75 additions and 55 deletions
@@ -129,9 +129,10 @@ class GVGBattleData {
if(!teamMem) { // 基本不会有没有这个内存的情况,有的话就让他重新计算一次吧
this.enterCity(team); continue;
}
let { areaId: fromAreaId, pointId: fromPointId } = teamMem;
let { curTeamBreak, pointId } = team;
let { areaId: fromAreaId, pointId: originPointId } = teamMem;
teamMem.updateTeam(team);
this.setRolePoints(team.roleId, fromPointId, team.pointId, team.teamCode);
this.setRolePoints(team.roleId, originPointId, curTeamBreak? 0: pointId, team.teamCode);
this.setAreaMap(team.teamCode, fromAreaId, team.areaId);
}
}
@@ -191,6 +192,7 @@ export async function initTeamToMem() {
if(period != GVG_PERIOD.BATTLE) return;
let teams = await GVGTeamModel.findByConfigId(configId);
for(let team of teams) {
if(team.isBroken) continue;
if(dispatch(team.cityId.toString(), servers)?.id == sid) {
let teamObj = getGVGBattleData(team.groupKey);
teamObj.enterCity(team);