🐞 fix(gvg): 调整spine下发数量开关
This commit is contained in:
@@ -24,14 +24,19 @@ class GVGBattleData {
|
||||
this.groupKey = groupKey;
|
||||
}
|
||||
|
||||
public findTeamsByArea(areaId: number) {
|
||||
public findTeamsByArea(areaId: number, count: number) {
|
||||
let teamCodes = this.areaToTeams.get(areaId)||new Set();
|
||||
let teams: GVGTeamMem[] = [];
|
||||
let otherTeams: GVGTeamMem[] = [], robots: GVGTeamMem[] = [], points: GVGTeamMem[] = [];
|
||||
for(let teamCode of teamCodes) {
|
||||
let team = this.teams.get(teamCode);
|
||||
if(team && !team.isBroken) teams.push(team);
|
||||
if(team && !team.isBroken) {
|
||||
if(team.pointId > 0) { points.push(team); continue; }
|
||||
if(team.isRobot) { robots.push(team); continue; }
|
||||
otherTeams.push(team);
|
||||
}
|
||||
}
|
||||
return teams.slice(0, 20);
|
||||
let teams = [...points, ...robots, ...otherTeams];
|
||||
return teams.slice(0, count);
|
||||
}
|
||||
|
||||
public findCatapultAttackTeam(areaId: number, leagueCode: string) {
|
||||
|
||||
Reference in New Issue
Block a user