mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 13:22:48 +01:00
Core/Players: Use TeleportLocation for summon and recall locations
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user