Core/Spells: fix wrong distance calculations in AoE spells [Needs testing] (#16290)
Core/Spells: Fix wrong distance calculations in AoE spells. Pull request #16290 by chaodhib. God bless, finally. (cherry picked from commit a1f2f30c145f6ad9c4baeffeff32618e71ff537c)
This commit is contained in:
1 parent
4ad1d377fe
commit
17c4d8f6d9
11 files changed
+123
-46
No files matched your search
@@ -148,6 +148,12 @@ bool Position::IsWithinBox(const Position& center, float xradius, float yradius,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Position::IsWithinDoubleVerticalCylinder(Position const* center, float radius, float height) const
|
||||
{
|
||||
float verticalDelta = GetPositionZ() - center->GetPositionZ();
|
||||
return IsInDist2d(center, radius) && std::abs(verticalDelta) <= height;
|
||||
}
|
||||
|
||||
bool Position::HasInArc(float arc, const Position* obj, float border) const
|
||||
{
|
||||
// always have self in arc
|
||||
|
||||
Reference in new issue
Block a user