🐞 fix(gvg): 修复队伍进出城池内存更新
This commit is contained in:
@@ -27,7 +27,7 @@ class GVGBattleData {
|
||||
let teams: GVGTeamMem[] = [];
|
||||
for(let teamCode of teamCodes) {
|
||||
let team = this.teams.get(teamCode);
|
||||
if(team) teams.push(team);
|
||||
if(team && !team.isBroken) teams.push(team);
|
||||
}
|
||||
return teams.slice(0, 20);
|
||||
}
|
||||
@@ -90,8 +90,8 @@ class GVGBattleData {
|
||||
|
||||
private setRolePoints(roleId: string, fromPointId: number, pointId: number, teamCode: string) {
|
||||
if(fromPointId > 0 && pointId == 0) { // 被打得撤离积分点
|
||||
if(this.rolePoints.has(roleId) && this.rolePoints.get(roleId).has(pointId)) {
|
||||
this.rolePoints.get(roleId).delete(pointId);
|
||||
if(this.rolePoints.has(roleId) && this.rolePoints.get(roleId).has(fromPointId)) {
|
||||
this.rolePoints.get(roleId).delete(fromPointId);
|
||||
}
|
||||
} else if (fromPointId == 0 && pointId > 0) {
|
||||
if(!this.rolePoints.has(roleId)) this.rolePoints.set(roleId, new Map());
|
||||
|
||||
Reference in New Issue
Block a user