🐞 fix(gvg): 激战期投石车推送

This commit is contained in:
luying
2023-02-24 21:02:51 +08:00
parent 99b19ee566
commit 86af54a50d
3 changed files with 32 additions and 31 deletions
@@ -33,15 +33,17 @@ class GVGBattleData {
}
public findCatapultAttackTeam(areaIds: number[], leagueCode: string) {
let teams: string[] = [];
let teamsByArea = new Map<number, string[]>();
for(let areaId of areaIds) {
let teams: string[] = [];
let teamCodes = this.areaToTeams.get(areaId)||new Set();
for(let teamCode of teamCodes) {
let team = this.teams.get(teamCode);
if(team && team.leagueCode != leagueCode && !team.isRobot) teams.push(teamCode);
}
teamsByArea.set(areaId, teams);
}
return teams;
return teamsByArea;
}
public leaveCity(roleId: string) {