Core/Spells: fix wrong distance calculations in AoE spells
Port From (https://github.com/TrinityCore/TrinityCore/commit/5d076cfe291980bc5be9d44ffbae887e3dd5ad59)
This commit is contained in:
@@ -271,6 +271,13 @@ namespace Game.Entities
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool IsWithinDoubleVerticalCylinder(Position center, float radius, float height)
|
||||
{
|
||||
float verticalDelta = GetPositionZ() - center.GetPositionZ();
|
||||
return IsInDist2d(center, radius) && Math.Abs(verticalDelta) <= height;
|
||||
}
|
||||
|
||||
public bool HasInArc(float arc, Position obj, float border = 2.0f)
|
||||
{
|
||||
// always have self in arc
|
||||
|
||||
Reference in New Issue
Block a user