Core/Battlegrounds: Fixed memory and CPU cycle leak that was caused by BG objects not being removed properly in "All Arenas" case

This commit is contained in:
leak
2011-03-13 21:52:37 +01:00
parent e97d6e3a60
commit a874fe0764
@@ -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);
}