*Teleport player to homebind if instance can't be created in WorldSession::HandleMoveWorldportAckOpcode.
--HG-- branch : trunk
This commit is contained in:
1 parent
d577d00313
commit
aa60def6ac
4 files changed
+26
-6
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user