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
+2 -1
View File
@@ -1068,7 +1068,8 @@ namespace Game.BattleGrounds
}
// reset all map criterias on map enter
player.ResetCriteria(CriteriaFailEvent.LeaveBattleground, GetMapId(), true);
if (!isInBattleground)
player.ResetCriteria(CriteriaFailEvent.LeaveBattleground, GetMapId(), true);
// setup BG group membership
PlayerAddedToBGCheckIfBGIsRunning(player);