Core/Players: Use TeleportLocation for summon and recall locations
Port From (https://github.com/TrinityCore/TrinityCore/commit/b2d735114be57f970f3dd16d57077cf4f8893796)
This commit is contained in:
@@ -129,8 +129,7 @@ namespace Game.Entities
|
||||
|
||||
// Player summoning
|
||||
long m_summon_expire;
|
||||
WorldLocation m_summon_location;
|
||||
uint m_summon_instanceId;
|
||||
TeleportLocation m_summon_location;
|
||||
|
||||
RestMgr _restMgr;
|
||||
|
||||
@@ -216,8 +215,7 @@ namespace Game.Entities
|
||||
byte m_fishingSteps;
|
||||
|
||||
// Recall position
|
||||
WorldLocation m_recall_location;
|
||||
uint m_recall_instanceId;
|
||||
TeleportLocation m_recall_location;
|
||||
WorldLocation homebind = new();
|
||||
uint homebindAreaId;
|
||||
uint m_HomebindTimer;
|
||||
|
||||
@@ -2408,8 +2408,7 @@ namespace Game.Entities
|
||||
return;
|
||||
|
||||
m_summon_expire = GameTime.GetGameTime() + PlayerConst.MaxPlayerSummonDelay;
|
||||
m_summon_location = new WorldLocation(summoner);
|
||||
m_summon_instanceId = summoner.GetInstanceId();
|
||||
m_summon_location = new() { Location = new WorldLocation(summoner), InstanceId = summoner.GetInstanceId() };
|
||||
|
||||
SummonRequest summonRequest = new();
|
||||
summonRequest.SummonerGUID = summoner.GetGUID();
|
||||
@@ -2491,7 +2490,7 @@ namespace Game.Entities
|
||||
UpdateCriteria(CriteriaType.AcceptSummon, 1);
|
||||
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Summon);
|
||||
|
||||
TeleportTo(m_summon_location, 0, m_summon_instanceId);
|
||||
TeleportTo(m_summon_location);
|
||||
|
||||
broadcastSummonResponse(true);
|
||||
}
|
||||
@@ -5840,11 +5839,10 @@ namespace Game.Entities
|
||||
|
||||
public void SaveRecallPosition()
|
||||
{
|
||||
m_recall_location = new WorldLocation(this);
|
||||
m_recall_instanceId = GetInstanceId();
|
||||
m_recall_location = new TeleportLocation() { Location = new WorldLocation(this), InstanceId = GetInstanceId() };
|
||||
}
|
||||
|
||||
public void Recall() { TeleportTo(m_recall_location, 0, m_recall_instanceId); }
|
||||
public void Recall() { TeleportTo(m_recall_location); }
|
||||
|
||||
public uint GetSaveTimer() { return m_nextSave; }
|
||||
void SetSaveTimer(uint timer) { m_nextSave = timer; }
|
||||
@@ -7649,7 +7647,7 @@ namespace Game.Entities
|
||||
return homebind;
|
||||
}
|
||||
|
||||
public WorldLocation GetRecall()
|
||||
public TeleportLocation GetRecall()
|
||||
{
|
||||
return m_recall_location;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user