From a874fe07642c0640008d1a709745e4ec829ab8a1 Mon Sep 17 00:00:00 2001 From: leak Date: Sun, 13 Mar 2011 21:51:54 +0100 Subject: [PATCH] Core/Battlegrounds: Fixed memory and CPU cycle leak that was caused by BG objects not being removed properly in "All Arenas" case --- src/server/game/Battlegrounds/BattlegroundQueue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index 67e8f8f907..deb4293d43 100755 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -342,7 +342,7 @@ void BattlegroundQueue::RemovePlayer(const uint64& guid, bool decreaseInvitedCou // if invited to bg, and should decrease invited count, then do it if (decreaseInvitedCount && group->IsInvitedToBGInstanceGUID) { - Battleground* bg = sBattlegroundMgr->GetBattleground(group->IsInvitedToBGInstanceGUID, group->BgTypeId); + Battleground* bg = sBattlegroundMgr->GetBattleground(group->IsInvitedToBGInstanceGUID, BATTLEGROUND_AA ? BATTLEGROUND_TYPE_NONE : group->BgTypeId); if (bg) bg->DecreaseInvitedCount(group->Team); }