mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 03:12:09 +01:00
*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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user