Core/Battlegrounds: Avoid reset BG and Arena scoreboard stats and BG map achievement criterias when relogin if player was already in the BG

Port From (https://github.com/TrinityCore/TrinityCore/commit/1bfbc371d5e2c756da6dc9f658cafcac5779ff60)
This commit is contained in:
hondacrx
2022-05-30 14:30:15 -04:00
parent 69ebe041cf
commit 1eb79de56e
6 changed files with 17 additions and 6 deletions
+3 -1
View File
@@ -45,8 +45,10 @@ namespace Game.Arenas
public override void AddPlayer(Player player)
{
bool isInBattleground = IsPlayerInBattleground(player.GetGUID());
base.AddPlayer(player);
PlayerScores[player.GetGUID()] = new ArenaScore(player.GetGUID(), player.GetBGTeam());
if (!isInBattleground)
PlayerScores[player.GetGUID()] = new ArenaScore(player.GetGUID(), player.GetBGTeam());
if (player.GetBGTeam() == Team.Alliance) // gold
{