Core/Battleground: fix re-enter into battleground after disconnect

This commit is contained in:
Wilds
2012-01-04 11:52:13 +01:00
parent ced346076b
commit 2a38902d2e
3 changed files with 13 additions and 7 deletions

View File

@@ -124,9 +124,17 @@ Map* MapInstanced::CreateInstanceForPlayer(const uint32 mapId, Player* player)
// the instance id is set in battlegroundid
NewInstanceId = player->GetBattlegroundId();
if (!NewInstanceId) return NULL;
map = FindInstanceMap(NewInstanceId);
map = sMapMgr->FindMap(mapId, NewInstanceId);
if (!map)
map = CreateBattleground(NewInstanceId, player->GetBattleground());
{
if (Battleground* bg = player->GetBattleground())
map = CreateBattleground(NewInstanceId, bg);
else
{
player->TeleportToBGEntryPoint();
return NULL;
}
}
}
else
{