diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-05-26 11:37:32 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-05-26 11:37:32 +0200 |
commit | b2d735114be57f970f3dd16d57077cf4f8893796 (patch) | |
tree | c28b49910be2e3b4317e67a1d7c8a7c51be71b40 /src | |
parent | b0abb1906cbd8de8d8ef581c3db7b666a26c7f59 (diff) |
Core/Players: Use TeleportLocation for summon and recall locations
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 9 | ||||
-rw-r--r-- | src/server/game/Entities/Player/Player.h | 12 |
2 files changed, 8 insertions, 13 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 7a89cd5f48c..30ca864c5a2 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -299,9 +299,6 @@ Player::Player(WorldSession* session) : Unit(true), m_sceneMgr(this) // Player summoning m_summon_expire = 0; - m_summon_instanceId = 0; - - m_recall_instanceId = 0; m_unitMovedByMe = this; m_playerMovingMe = this; @@ -25288,8 +25285,8 @@ void Player::SendSummonRequestFrom(Unit* summoner) return; m_summon_expire = GameTime::GetGameTime() + MAX_PLAYER_SUMMON_DELAY; - m_summon_location.WorldRelocate(*summoner); - m_summon_instanceId = summoner->GetInstanceId(); + m_summon_location.Location.WorldRelocate(*summoner); + m_summon_location.InstanceId = summoner->GetInstanceId(); WorldPackets::Movement::SummonRequest summonRequest; summonRequest.SummonerGUID = summoner->GetGUID(); @@ -25340,7 +25337,7 @@ void Player::SummonIfPossible(bool agree) UpdateCriteria(CriteriaType::AcceptSummon, 1); RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags::Summon); - TeleportTo(m_summon_location, TELE_TO_NONE, m_summon_instanceId); + TeleportTo(m_summon_location, TELE_TO_NONE); broadcastSummonResponse(true); } diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 60cc99a0ae9..24bc8ae574b 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2553,10 +2553,10 @@ class TC_GAME_API Player final : public Unit, public GridObject<Player> void SaveRecallPosition() { - m_recall_location.WorldRelocate(*this); - m_recall_instanceId = GetInstanceId(); + m_recall_location.Location.WorldRelocate(*this); + m_recall_location.InstanceId = GetInstanceId(); } - void Recall() { TeleportTo(m_recall_location, TELE_TO_NONE, m_recall_instanceId); } + void Recall() { TeleportTo(m_recall_location, TELE_TO_NONE); } void SetHomebind(WorldLocation const& loc, uint32 areaId); void SendBindPointUpdate() const; @@ -3179,12 +3179,10 @@ class TC_GAME_API Player final : public Unit, public GridObject<Player> // Player summoning time_t m_summon_expire; - WorldLocation m_summon_location; - uint32 m_summon_instanceId; + TeleportLocation m_summon_location; // Recall position - WorldLocation m_recall_location; - uint32 m_recall_instanceId; + TeleportLocation m_recall_location; std::unique_ptr<Runes> m_runes; EquipmentSetContainer _equipmentSets; |