*Teleport player to homebind if instance can't be created in WorldSession::HandleMoveWorldportAckOpcode.

--HG--
branch : trunk
This commit is contained in:
QAston committed 2009-08-01 20:23:23 +02:00
1 parent d577d00313
commit aa60def6ac
4 files changed
+26 -6

No files matched your search

+1 -1
View File
@@ -72,7 +72,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
Map * newMap = MapManager::Instance().CreateMap(loc.mapid, GetPlayer(), 0);
// the CanEnter checks are done in TeleporTo but conditions may change
// while the player is in transit, for example the map may get full
if (!newMap->CanEnter(GetPlayer()))
if (!newMap || !newMap->CanEnter(GetPlayer()))
{
sLog.outError("Map %d could not be created for player %d, porting player to homebind", loc.mapid, GetPlayer()->GetGUIDLow());
GetPlayer()->RelocateToHomebind(loc.mapid);