🐞 fix(gvg): 更新gvg战斗返回

This commit is contained in:
luying
2023-02-27 21:54:54 +08:00
parent 840b84ae68
commit 1f04496865
4 changed files with 13 additions and 5 deletions
@@ -462,7 +462,7 @@ export class GVGBattleHandler {
teamObj.setTime(defenseTeam.teamCode, defenseTeam);
let heroes = getOppHeroes(warId, defenseTeam.isRobot, defenseTeam.lineup)
return resResult(STATUS.SUCCESS, { battleCode: battleRecord.battleCode, warId, isRobot: defenseTeam.isRobot, heroes, curTeam: new MyTeamInfo(attackTeam) });
return resResult(STATUS.SUCCESS, { battleCode: battleRecord.battleCode, warId, isRobot: defenseTeam.isRobot, heroes, curTeam: new MyTeamInfo(attackTeam), oppTeam: new MyTeamInfo(defenseTeam) });
}
// 队伍停止攻击
@@ -655,8 +655,10 @@ export class GVGBattleHandler {
let pointIds = gameData.gvgPointByAreaId.get(areaId)||[];
let pointArrs: { pointId: number, guardLeagueName: string }[] = [];
for(let pointId of pointIds) {
let dicAreaPoint = gameData.gvgAreaPoint.get(pointId);
if(!dicAreaPoint) continue;
let playerPoint = points.find(cur => cur.pointId == pointId);
pointArrs.push({ pointId, guardLeagueName: playerPoint? (playerPoint.leagueName||"无"): GVG.GVG_ROBOT_NAME });
pointArrs.push({ pointId, guardLeagueName: playerPoint? (playerPoint.leagueName||"无"): dicAreaPoint.name });
}
if(pointArrs.length > 0) areas.push({ areaId, points: pointArrs });
}