diff options
author | QAston <none@none> | 2009-07-19 14:02:52 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-07-19 14:02:52 +0200 |
commit | 94992adb64544ab6a813f3e244a2e14cf80823f5 (patch) | |
tree | 2ace74a058e5d7b230246a8d62cec39fa2f213fe /src/game/MovementHandler.cpp | |
parent | a91296aec675dda685e14e02a574a4ec7d4e2110 (diff) |
*Fix DK presences and their improved versions - original patch by thenecromancer
*Port player to homebind if instance cannot be created in WorldSession::HandleMoveWorldportAckOpcode.
--HG--
branch : trunk
Diffstat (limited to 'src/game/MovementHandler.cpp')
-rw-r--r-- | src/game/MovementHandler.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index 58bc5004e1f..18e84092ddf 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -70,11 +70,14 @@ void WorldSession::HandleMoveWorldportAckOpcode() Map * newMap = MapManager::Instance().CreateMap(loc.mapid, GetPlayer()); if (!newMap) { - sLog.outCrash("map %d could not be created for player "UI64FMTD, loc.mapid, GetPlayer()->GetGUID()); - assert (false); + sLog.outError("Map %d could not be created for player %d, porting player to homebind", loc.mapid, GetPlayer()->GetGUIDLow()); + GetPlayer()->RelocateToHomebind(); + newMap = MapManager::Instance().CreateMap(GetPlayer()->GetMapId(), GetPlayer()); } + else + GetPlayer()->Relocate(loc.coord_x, loc.coord_y, loc.coord_z, loc.orientation); + GetPlayer()->SetMap(newMap); - GetPlayer()->Relocate(loc.coord_x, loc.coord_y, loc.coord_z, loc.orientation); GetPlayer()->SendInitialPacketsBeforeAddToMap(); // the CanEnter checks are done in TeleporTo but conditions may change |