Core/Characters: Made homebind location a WorldLocation (this implicitly adds orientation) (#27055)

This commit is contained in:
ModoX
2021-10-16 01:17:47 +02:00
committed by GitHub
parent 82b3a409db
commit 68c2fc8ff5
15 changed files with 57 additions and 57 deletions

View File

@@ -87,7 +87,7 @@ void WorldSession::HandleMoveWorldportAck()
if (!newMap || newMap->CannotEnter(GetPlayer()))
{
TC_LOG_ERROR("network", "Map %d (%s) could not be created for %s (%s), porting player to homebind", loc.GetMapId(), newMap ? newMap->GetMapName() : "Unknown", GetPlayer()->GetGUID().ToString().c_str(), GetPlayer()->GetName().c_str());
GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation());
GetPlayer()->TeleportTo(GetPlayer()->m_homebind);
return;
}
@@ -112,7 +112,7 @@ void WorldSession::HandleMoveWorldportAck()
GetPlayer()->GetName().c_str(), GetPlayer()->GetGUID().ToString().c_str(), loc.GetMapId(), newMap ? newMap->GetMapName() : "Unknown");
GetPlayer()->ResetMap();
GetPlayer()->SetMap(oldMap);
GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation());
GetPlayer()->TeleportTo(GetPlayer()->m_homebind);
return;
}