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
|
// Player summoning
|
||||||
long m_summon_expire;
|
long m_summon_expire;
|
||||||
WorldLocation m_summon_location;
|
TeleportLocation m_summon_location;
|
||||||
uint m_summon_instanceId;
|
|
||||||
|
|
||||||
RestMgr _restMgr;
|
RestMgr _restMgr;
|
||||||
|
|
||||||
@@ -216,8 +215,7 @@ namespace Game.Entities
|
|||||||
byte m_fishingSteps;
|
byte m_fishingSteps;
|
||||||
|
|
||||||
// Recall position
|
// Recall position
|
||||||
WorldLocation m_recall_location;
|
TeleportLocation m_recall_location;
|
||||||
uint m_recall_instanceId;
|
|
||||||
WorldLocation homebind = new();
|
WorldLocation homebind = new();
|
||||||
uint homebindAreaId;
|
uint homebindAreaId;
|
||||||
uint m_HomebindTimer;
|
uint m_HomebindTimer;
|
||||||
|
|||||||
@@ -2408,8 +2408,7 @@ namespace Game.Entities
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
m_summon_expire = GameTime.GetGameTime() + PlayerConst.MaxPlayerSummonDelay;
|
m_summon_expire = GameTime.GetGameTime() + PlayerConst.MaxPlayerSummonDelay;
|
||||||
m_summon_location = new WorldLocation(summoner);
|
m_summon_location = new() { Location = new WorldLocation(summoner), InstanceId = summoner.GetInstanceId() };
|
||||||
m_summon_instanceId = summoner.GetInstanceId();
|
|
||||||
|
|
||||||
SummonRequest summonRequest = new();
|
SummonRequest summonRequest = new();
|
||||||
summonRequest.SummonerGUID = summoner.GetGUID();
|
summonRequest.SummonerGUID = summoner.GetGUID();
|
||||||
@@ -2491,7 +2490,7 @@ namespace Game.Entities
|
|||||||
UpdateCriteria(CriteriaType.AcceptSummon, 1);
|
UpdateCriteria(CriteriaType.AcceptSummon, 1);
|
||||||
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Summon);
|
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Summon);
|
||||||
|
|
||||||
TeleportTo(m_summon_location, 0, m_summon_instanceId);
|
TeleportTo(m_summon_location);
|
||||||
|
|
||||||
broadcastSummonResponse(true);
|
broadcastSummonResponse(true);
|
||||||
}
|
}
|
||||||
@@ -5840,11 +5839,10 @@ namespace Game.Entities
|
|||||||
|
|
||||||
public void SaveRecallPosition()
|
public void SaveRecallPosition()
|
||||||
{
|
{
|
||||||
m_recall_location = new WorldLocation(this);
|
m_recall_location = new TeleportLocation() { Location = new WorldLocation(this), InstanceId = GetInstanceId() };
|
||||||
m_recall_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; }
|
public uint GetSaveTimer() { return m_nextSave; }
|
||||||
void SetSaveTimer(uint timer) { m_nextSave = timer; }
|
void SetSaveTimer(uint timer) { m_nextSave = timer; }
|
||||||
@@ -7649,7 +7647,7 @@ namespace Game.Entities
|
|||||||
return homebind;
|
return homebind;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WorldLocation GetRecall()
|
public TeleportLocation GetRecall()
|
||||||
{
|
{
|
||||||
return m_recall_location;
|
return m_recall_location;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user