🐞 fix(gvg): 修复攻打掉占领据点的队伍时的数据错误

This commit is contained in:
luying
2023-03-07 16:44:48 +08:00
parent 82e6d5ec08
commit 6b79612a5e
4 changed files with 13 additions and 10 deletions
@@ -104,11 +104,12 @@ class GVGBattleData {
}
private setRolePoints(roleId: string, fromPointId: number, pointId: number, teamCode: string) {
if(fromPointId > 0 && pointId == 0) { // 被打得撤离积分点
if(fromPointId > 0) { // 被打得撤离积分点
if(this.rolePoints.has(roleId) && this.rolePoints.get(roleId).has(fromPointId)) {
this.rolePoints.get(roleId).delete(fromPointId);
}
} else if (fromPointId == 0 && pointId > 0) {
}
if (pointId > 0) {
if(!this.rolePoints.has(roleId)) this.rolePoints.set(roleId, new Map());
this.rolePoints.get(roleId).set(pointId, teamCode);
}