[7353] Fixed problem with joining rated arena matches. Thanks to balrok for help.

Signed-off-by: Triply <triply@getmangos.com>
This commit is contained in:
Triply 2009-02-27 14:20:31 +01:00
parent 0be003ac90
commit a81d174288
10 changed files with 99 additions and 72 deletions

View file

@ -115,7 +115,7 @@ BattleGround::~BattleGround()
// remove from battlegrounds
}
sBattleGroundMgr.RemoveBattleGround(GetInstanceID());
sBattleGroundMgr.RemoveBattleGround(GetInstanceID(), GetTypeID());
// unload map
if(Map * map = MapManager::Instance().FindMap(GetMapId(), GetInstanceID()))
if(map->IsBattleGroundOrArena())
@ -835,7 +835,7 @@ void BattleGround::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
}
// Do next only if found in battleground
plr->SetBattleGroundId(0); // We're not in BG.
plr->SetBattleGroundId(0, BATTLEGROUND_TYPE_NONE); // We're not in BG.
// reset destination bg team
plr->SetBGTeam(0);
@ -1010,7 +1010,7 @@ void BattleGround::RemoveFromBGFreeSlotQueue()
// set to be able to re-add if needed
m_InBGFreeSlotQueue = false;
// uncomment this code when battlegrounds will work like instances
for (std::deque<BattleGround*>::iterator itr = sBattleGroundMgr.BGFreeSlotQueue[m_TypeID].begin(); itr != sBattleGroundMgr.BGFreeSlotQueue[m_TypeID].end(); ++itr)
for (BGFreeSlotQueueType::iterator itr = sBattleGroundMgr.BGFreeSlotQueue[m_TypeID].begin(); itr != sBattleGroundMgr.BGFreeSlotQueue[m_TypeID].end(); ++itr)
{
if ((*itr)->GetInstanceID() == m_InstanceID)
{