Core/Phasing: Reduce differences between branches in GridNotifiers
Port From (https://github.com/TrinityCore/TrinityCore/commit/c3f385c48f5080e64b13b0f31864e20e04e531aa)
This commit is contained in:
@@ -1467,7 +1467,7 @@ namespace Game.Entities
|
||||
|
||||
public bool IsWithinMeleeRangeAt(Position pos, Unit obj)
|
||||
{
|
||||
if (!obj || !IsInMap(obj) || !IsInPhase(obj))
|
||||
if (!obj || !IsInMap(obj) || !InSamePhase(obj))
|
||||
return false;
|
||||
|
||||
float dx = pos.GetPositionX() - obj.GetPositionX();
|
||||
|
||||
@@ -679,7 +679,7 @@ namespace Game.Entities
|
||||
|
||||
public bool IsWithinBoundaryRadius(Unit obj)
|
||||
{
|
||||
if (!obj || !IsInMap(obj) || !IsInPhase(obj))
|
||||
if (!obj || !IsInMap(obj) || !InSamePhase(obj))
|
||||
return false;
|
||||
|
||||
float objBoundaryRadius = Math.Max(obj.GetBoundingRadius(), SharedConst.MinMeleeReach);
|
||||
@@ -1110,7 +1110,7 @@ namespace Game.Entities
|
||||
|
||||
public bool IsWithinCombatRange(Unit obj, float dist2compare)
|
||||
{
|
||||
if (!obj || !IsInMap(obj) || !IsInPhase(obj))
|
||||
if (!obj || !IsInMap(obj) || !InSamePhase(obj))
|
||||
return false;
|
||||
|
||||
float dx = GetPositionX() - obj.GetPositionX();
|
||||
|
||||
@@ -3094,7 +3094,7 @@ namespace Game.Entities
|
||||
else
|
||||
{
|
||||
Unit caster = aura.GetCaster();
|
||||
if (!caster || !caster.IsInPhase(this))
|
||||
if (!caster || !caster.InSamePhase(this))
|
||||
RemoveOwnedAura(pair);
|
||||
}
|
||||
}
|
||||
@@ -3104,7 +3104,7 @@ namespace Game.Entities
|
||||
for (var i = 0; i < m_scAuras.Count; i++)
|
||||
{
|
||||
var aura = m_scAuras[i];
|
||||
if (aura.GetUnitOwner() != this && (!onPhaseChange || !aura.GetUnitOwner().IsInPhase(this)))
|
||||
if (aura.GetUnitOwner() != this && (!onPhaseChange || !aura.GetUnitOwner().InSamePhase(this)))
|
||||
aura.Remove();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user