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_bMustDelayTeleport = false;
|
||||||
m_bHasDelayedTeleport = false;
|
m_bHasDelayedTeleport = false;
|
||||||
teleportStore_options = 0;
|
teleportStore_options = 0;
|
||||||
|
m_canTeleport = false;
|
||||||
|
|
||||||
m_trade = nullptr;
|
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
|
// near teleport, triggering send MSG_MOVE_TELEPORT_ACK from client at landing
|
||||||
if (!GetSession()->PlayerLogout())
|
if (!GetSession()->PlayerLogout())
|
||||||
{
|
{
|
||||||
|
SetCanTeleport(true);
|
||||||
Position oldPos = GetPosition();
|
Position oldPos = GetPosition();
|
||||||
Relocate(x, y, z, orientation);
|
Relocate(x, y, z, orientation);
|
||||||
SendTeleportAckPacket();
|
SendTeleportAckPacket();
|
||||||
@@ -1565,6 +1567,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
|||||||
|
|
||||||
if (!GetSession()->PlayerLogout())
|
if (!GetSession()->PlayerLogout())
|
||||||
{
|
{
|
||||||
|
SetCanTeleport(true);
|
||||||
WorldPacket data(SMSG_NEW_WORLD, 4 + 4 + 4 + 4 + 4);
|
WorldPacket data(SMSG_NEW_WORLD, 4 + 4 + 4 + 4 + 4);
|
||||||
data << uint32(mapid);
|
data << uint32(mapid);
|
||||||
if (m_transport)
|
if (m_transport)
|
||||||
|
|||||||
@@ -2443,6 +2443,9 @@ public:
|
|||||||
void SetMap(Map* map) override;
|
void SetMap(Map* map) override;
|
||||||
void ResetMap() override;
|
void ResetMap() override;
|
||||||
|
|
||||||
|
bool CanTeleport() { return m_canTeleport; }
|
||||||
|
void SetCanTeleport(bool value) { m_canTeleport = value; }
|
||||||
|
|
||||||
bool isAllowedToLoot(const Creature* creature);
|
bool isAllowedToLoot(const Creature* creature);
|
||||||
|
|
||||||
[[nodiscard]] DeclinedName const* GetDeclinedNames() const { return m_declinedname; }
|
[[nodiscard]] DeclinedName const* GetDeclinedNames() const { return m_declinedname; }
|
||||||
@@ -2896,6 +2899,7 @@ private:
|
|||||||
uint32 m_DelayedOperations;
|
uint32 m_DelayedOperations;
|
||||||
bool m_bMustDelayTeleport;
|
bool m_bMustDelayTeleport;
|
||||||
bool m_bHasDelayedTeleport;
|
bool m_bHasDelayedTeleport;
|
||||||
|
bool m_canTeleport;
|
||||||
|
|
||||||
std::unique_ptr<PetStable> m_petStable;
|
std::unique_ptr<PetStable> m_petStable;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user