Core/Battlegrounds: Correct distance check in HandleAreaSpiritHealerQueryOpcode and HandleAreaSpiritHealerQueueOpcode.
Port From (https://github.com/TrinityCore/TrinityCore/commit/83bc908531d827b318d1281fa686aa95a34ab075)
This commit is contained in:
@@ -1888,7 +1888,6 @@ namespace Game.BattleGrounds
|
|||||||
public Dictionary<ObjectGuid, BattlegroundPlayer> GetPlayers() { return m_Players; }
|
public Dictionary<ObjectGuid, BattlegroundPlayer> GetPlayers() { return m_Players; }
|
||||||
uint GetPlayersSize() { return (uint)m_Players.Count; }
|
uint GetPlayersSize() { return (uint)m_Players.Count; }
|
||||||
uint GetPlayerScoresSize() { return (uint)PlayerScores.Count; }
|
uint GetPlayerScoresSize() { return (uint)PlayerScores.Count; }
|
||||||
uint GetReviveQueueSize() { return (uint)m_ReviveQueue.Count; }
|
|
||||||
|
|
||||||
public void SetBgMap(BattlegroundMap map) { m_Map = map; }
|
public void SetBgMap(BattlegroundMap map) { m_Map = map; }
|
||||||
BattlegroundMap FindBgMap() { return m_Map; }
|
BattlegroundMap FindBgMap() { return m_Map; }
|
||||||
@@ -1964,8 +1963,6 @@ namespace Game.BattleGrounds
|
|||||||
protected Dictionary<ObjectGuid, BattlegroundScore> PlayerScores = new(); // Player scores
|
protected Dictionary<ObjectGuid, BattlegroundScore> PlayerScores = new(); // Player scores
|
||||||
// Player lists, those need to be accessible by inherited classes
|
// Player lists, those need to be accessible by inherited classes
|
||||||
Dictionary<ObjectGuid, BattlegroundPlayer> m_Players = new();
|
Dictionary<ObjectGuid, BattlegroundPlayer> m_Players = new();
|
||||||
// Spirit Guide guid + Player list GUIDS
|
|
||||||
MultiMap<ObjectGuid, ObjectGuid> m_ReviveQueue = new();
|
|
||||||
|
|
||||||
// these are important variables used for starting messages
|
// these are important variables used for starting messages
|
||||||
BattlegroundEventFlags m_Events;
|
BattlegroundEventFlags m_Events;
|
||||||
|
|||||||
@@ -627,7 +627,7 @@ namespace Game
|
|||||||
if (!spiritHealer.IsAreaSpiritHealer())
|
if (!spiritHealer.IsAreaSpiritHealer())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_player.GetExactDist(spiritHealer) > PlayerConst.MaxAreaSpiritHealerRange)
|
if (!_player.IsWithinDistInMap(spiritHealer, PlayerConst.MaxAreaSpiritHealerRange))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (spiritHealer.IsAreaSpiritHealerIndividual())
|
if (spiritHealer.IsAreaSpiritHealerIndividual())
|
||||||
@@ -662,7 +662,7 @@ namespace Game
|
|||||||
if (!spiritHealer.IsAreaSpiritHealer())
|
if (!spiritHealer.IsAreaSpiritHealer())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_player.GetExactDist(spiritHealer) > PlayerConst.MaxAreaSpiritHealerRange)
|
if (!_player.IsWithinDistInMap(spiritHealer, PlayerConst.MaxAreaSpiritHealerRange))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_player.SetAreaSpiritHealer(spiritHealer);
|
_player.SetAreaSpiritHealer(spiritHealer);
|
||||||
|
|||||||
Reference in New Issue
Block a user