diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-05-26 11:37:32 +0200 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2024-06-20 01:02:40 +0200 |
commit | 236ed21e8dc80b1e8669eab71e78d1c276787ecf (patch) | |
tree | cdd5ee3930837ad5e065181941f6566e1b46194c /src | |
parent | 3619b6e6ff0a23d818af76627416e237a6c0c001 (diff) |
Core/Players: Use TeleportLocation for summon and recall locations
(cherry picked from commit b2d735114be57f970f3dd16d57077cf4f8893796)
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 79be45a11c8..2e1ff17727b 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -294,9 +294,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; @@ -24665,8 +24662,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(); @@ -24717,7 +24714,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 ee50e918108..f2c2a71b02d 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2476,10 +2476,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; @@ -3079,12 +3079,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; |