Add (core\db): Support for Homebind Orientation (#13389)

Add (core\db) Support for Homebind Orientation
This commit is contained in:
M'Dic
2022-10-12 14:39:02 -04:00
committed by GitHub
parent 7eb096ae0b
commit 2e6f6e26da
15 changed files with 43 additions and 33 deletions

View File

@@ -349,6 +349,7 @@ Player::Player(WorldSession* session): Unit(true), m_mover(this)
m_homebindX = 0;
m_homebindY = 0;
m_homebindZ = 0;
m_homebindO = 0;
m_contestedPvPTimer = 0;
@@ -1585,7 +1586,7 @@ bool Player::TeleportToEntryPoint()
if (loc.m_mapId == MAPID_INVALID)
{
return TeleportTo(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, GetOrientation());
return TeleportTo(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, m_homebindO);
}
return TeleportTo(loc);
@@ -4851,7 +4852,7 @@ void Player::RepopAtGraveyard()
}
}
else if (GetPositionZ() < GetMap()->GetMinHeight(GetPositionX(), GetPositionY()))
TeleportTo(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, GetOrientation());
TeleportTo(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, m_homebindO);
RemovePlayerFlag(PLAYER_FLAGS_IS_OUT_OF_BOUNDS);
}
@@ -11054,7 +11055,7 @@ void Player::SetEntryPoint()
}
if (m_entryPointData.joinPos.m_mapId == MAPID_INVALID)
m_entryPointData.joinPos = WorldLocation(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, 0.0f);
m_entryPointData.joinPos = WorldLocation(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, m_homebindO);
}
void Player::LeaveBattleground(Battleground* bg)
@@ -11293,7 +11294,7 @@ void Player::SendInitialPacketsBeforeAddToMap()
// Homebind
WorldPacket data(SMSG_BINDPOINTUPDATE, 5 * 4);
data << m_homebindX << m_homebindY << m_homebindZ;
data << m_homebindX << m_homebindY << m_homebindZ << m_homebindO;
data << (uint32) m_homebindMapId;
data << (uint32) m_homebindAreaId;
GetSession()->SendPacket(&data);