mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
feat (core): Add Teleport Helpers (#10611)
* feat (core): Add Teleport Helpers * Lower case the things
This commit is contained in:
@@ -220,6 +220,7 @@ Player::Player(WorldSession* session): Unit(true), m_mover(this)
|
||||
m_bMustDelayTeleport = false;
|
||||
m_bHasDelayedTeleport = false;
|
||||
teleportStore_options = 0;
|
||||
m_canTeleport = false;
|
||||
|
||||
m_trade = nullptr;
|
||||
|
||||
@@ -1463,6 +1464,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
||||
// near teleport, triggering send MSG_MOVE_TELEPORT_ACK from client at landing
|
||||
if (!GetSession()->PlayerLogout())
|
||||
{
|
||||
SetCanTeleport(true);
|
||||
Position oldPos = GetPosition();
|
||||
Relocate(x, y, z, orientation);
|
||||
SendTeleportAckPacket();
|
||||
@@ -1565,6 +1567,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
||||
|
||||
if (!GetSession()->PlayerLogout())
|
||||
{
|
||||
SetCanTeleport(true);
|
||||
WorldPacket data(SMSG_NEW_WORLD, 4 + 4 + 4 + 4 + 4);
|
||||
data << uint32(mapid);
|
||||
if (m_transport)
|
||||
|
||||
@@ -2443,6 +2443,9 @@ public:
|
||||
void SetMap(Map* map) override;
|
||||
void ResetMap() override;
|
||||
|
||||
bool CanTeleport() { return m_canTeleport; }
|
||||
void SetCanTeleport(bool value) { m_canTeleport = value; }
|
||||
|
||||
bool isAllowedToLoot(const Creature* creature);
|
||||
|
||||
[[nodiscard]] DeclinedName const* GetDeclinedNames() const { return m_declinedname; }
|
||||
@@ -2896,6 +2899,7 @@ private:
|
||||
uint32 m_DelayedOperations;
|
||||
bool m_bMustDelayTeleport;
|
||||
bool m_bHasDelayedTeleport;
|
||||
bool m_canTeleport;
|
||||
|
||||
std::unique_ptr<PetStable> m_petStable;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user