mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Scripts: Remove unneccessary DoublePosition from AreaBoundary
This commit is contained in:
@@ -16,52 +16,53 @@
|
||||
*/
|
||||
|
||||
#include "AreaBoundary.h"
|
||||
#include "Unit.h"
|
||||
#include "Errors.h"
|
||||
|
||||
// ---== RECTANGLE ==---
|
||||
RectangleBoundary::RectangleBoundary(float southX, float northX, float eastY, float westY, bool isInverted) :
|
||||
AreaBoundary(isInverted), _minX(southX), _maxX(northX), _minY(eastY), _maxY(westY) { }
|
||||
|
||||
bool RectangleBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||
{
|
||||
return !(
|
||||
pos->GetPositionX() < _minX ||
|
||||
pos->GetPositionX() > _maxX ||
|
||||
pos->GetPositionY() < _minY ||
|
||||
pos->GetPositionY() > _maxY
|
||||
);
|
||||
return pos->GetPositionX() >= _minX && pos->GetPositionX() <= _maxX
|
||||
&& pos->GetPositionY() >= _minY && pos->GetPositionY() <= _maxY;
|
||||
}
|
||||
|
||||
// ---== CIRCLE ==---
|
||||
CircleBoundary::CircleBoundary(Position const& center, double radius, bool isInverted) :
|
||||
AreaBoundary(isInverted), _center(center), _radiusSq(radius*radius) { }
|
||||
CircleBoundary::CircleBoundary(Position const& center, float radius, bool isInverted) :
|
||||
AreaBoundary(isInverted), _center(center), _radiusSq(radius * radius) { }
|
||||
|
||||
CircleBoundary::CircleBoundary(Position const& center, Position const& pointOnCircle, bool isInverted) :
|
||||
AreaBoundary(isInverted), _center(center), _radiusSq(_center.GetDoubleExactDist2dSq(pointOnCircle)) { }
|
||||
AreaBoundary(isInverted), _center(center), _radiusSq(_center.GetExactDist2dSq(pointOnCircle)) { }
|
||||
|
||||
bool CircleBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||
{
|
||||
double offX = _center.GetDoublePositionX() - pos->GetPositionX();
|
||||
double offY = _center.GetDoublePositionY() - pos->GetPositionY();
|
||||
return offX*offX+offY*offY <= _radiusSq;
|
||||
return _center.GetExactDistSq(pos) <= _radiusSq;
|
||||
}
|
||||
|
||||
// ---== ELLIPSE ==---
|
||||
EllipseBoundary::EllipseBoundary(Position const& center, double radiusX, double radiusY, bool isInverted) :
|
||||
AreaBoundary(isInverted), _center(center), _radiusYSq(radiusY*radiusY), _scaleXSq(_radiusYSq / (radiusX*radiusX)) { }
|
||||
EllipseBoundary::EllipseBoundary(Position const& center, float radiusX, float radiusY, bool isInverted) :
|
||||
AreaBoundary(isInverted), _center(center), _radiusYSq(radiusY * radiusY), _scaleXSq(_radiusYSq / (radiusX * radiusX)) { }
|
||||
|
||||
bool EllipseBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||
{
|
||||
double offX = _center.GetDoublePositionX() - pos->GetPositionX();
|
||||
double offY = _center.GetDoublePositionY() - pos->GetPositionY();
|
||||
return (offX*offX)*_scaleXSq + (offY*offY) <= _radiusYSq;
|
||||
float offX = _center.GetPositionX() - pos->GetPositionX();
|
||||
float offY = _center.GetPositionY() - pos->GetPositionY();
|
||||
return (offX * offX) * _scaleXSq + (offY * offY) <= _radiusYSq;
|
||||
}
|
||||
|
||||
// ---== TRIANGLE ==---
|
||||
TriangleBoundary::TriangleBoundary(Position const& pointA, Position const& pointB, Position const& pointC, bool isInverted) :
|
||||
AreaBoundary(isInverted), _a(pointA), _b(pointB), _c(pointC), _abx(_b.GetDoublePositionX()-_a.GetDoublePositionX()), _bcx(_c.GetDoublePositionX()-_b.GetDoublePositionX()), _cax(_a.GetDoublePositionX() - _c.GetDoublePositionX()), _aby(_b.GetDoublePositionY()-_a.GetDoublePositionY()), _bcy(_c.GetDoublePositionY()-_b.GetDoublePositionY()), _cay(_a.GetDoublePositionY() - _c.GetDoublePositionY()) { }
|
||||
AreaBoundary(isInverted), _a(pointA), _b(pointB), _c(pointC),
|
||||
_abx(_b.GetPositionX() - _a.GetPositionX()), _bcx(_c.GetPositionX() - _b.GetPositionX()), _cax(_a.GetPositionX() - _c.GetPositionX()),
|
||||
_aby(_b.GetPositionY() - _a.GetPositionY()), _bcy(_c.GetPositionY() - _b.GetPositionY()), _cay(_a.GetPositionY() - _c.GetPositionY()) { }
|
||||
|
||||
bool TriangleBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||
{
|
||||
// half-plane signs
|
||||
bool sign1 = ((-_b.GetDoublePositionX() + pos->GetPositionX()) * _aby - (-_b.GetDoublePositionY() + pos->GetPositionY()) * _abx) < 0;
|
||||
bool sign2 = ((-_c.GetDoublePositionX() + pos->GetPositionX()) * _bcy - (-_c.GetDoublePositionY() + pos->GetPositionY()) * _bcx) < 0;
|
||||
bool sign3 = ((-_a.GetDoublePositionX() + pos->GetPositionX()) * _cay - (-_a.GetDoublePositionY() + pos->GetPositionY()) * _cax) < 0;
|
||||
bool sign1 = ((-_b.GetPositionX() + pos->GetPositionX()) * _aby - (-_b.GetPositionY() + pos->GetPositionY()) * _abx) < 0;
|
||||
bool sign2 = ((-_c.GetPositionX() + pos->GetPositionX()) * _bcy - (-_c.GetPositionY() + pos->GetPositionY()) * _bcx) < 0;
|
||||
bool sign3 = ((-_a.GetPositionX() + pos->GetPositionX()) * _cay - (-_a.GetPositionY() + pos->GetPositionY()) * _cax) < 0;
|
||||
|
||||
// if all signs are the same, the point is inside the triangle
|
||||
return ((sign1 == sign2) && (sign2 == sign3));
|
||||
@@ -69,14 +70,18 @@ bool TriangleBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||
|
||||
// ---== PARALLELOGRAM ==---
|
||||
ParallelogramBoundary::ParallelogramBoundary(Position const& cornerA, Position const& cornerB, Position const& cornerD, bool isInverted) :
|
||||
AreaBoundary(isInverted), _a(cornerA), _b(cornerB), _d(cornerD), _c(DoublePosition(_d.GetDoublePositionX() + (_b.GetDoublePositionX() - _a.GetDoublePositionX()), _d.GetDoublePositionY() + (_b.GetDoublePositionY() - _a.GetDoublePositionY()))), _abx(_b.GetDoublePositionX() - _a.GetDoublePositionX()), _dax(_a.GetDoublePositionX() - _d.GetDoublePositionX()), _aby(_b.GetDoublePositionY() - _a.GetDoublePositionY()), _day(_a.GetDoublePositionY() - _d.GetDoublePositionY()) { }
|
||||
AreaBoundary(isInverted), _a(cornerA), _b(cornerB), _d(cornerD),
|
||||
_c(_d.GetPositionX() + (_b.GetPositionX() - _a.GetPositionX()), _d.GetPositionY() + (_b.GetPositionY() - _a.GetPositionY())),
|
||||
_abx(_b.GetPositionX() - _a.GetPositionX()), _dax(_a.GetPositionX() - _d.GetPositionX()),
|
||||
_aby(_b.GetPositionY() - _a.GetPositionY()), _day(_a.GetPositionY() - _d.GetPositionY()) { }
|
||||
|
||||
bool ParallelogramBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||
{
|
||||
// half-plane signs
|
||||
bool sign1 = ((-_b.GetDoublePositionX() + pos->GetPositionX()) * _aby - (-_b.GetDoublePositionY() + pos->GetPositionY()) * _abx) < 0;
|
||||
bool sign2 = ((-_a.GetDoublePositionX() + pos->GetPositionX()) * _day - (-_a.GetDoublePositionY() + pos->GetPositionY()) * _dax) < 0;
|
||||
bool sign3 = ((-_d.GetDoublePositionY() + pos->GetPositionY()) * _abx - (-_d.GetDoublePositionX() + pos->GetPositionX()) * _aby) < 0; // AB = -CD
|
||||
bool sign4 = ((-_c.GetDoublePositionY() + pos->GetPositionY()) * _dax - (-_c.GetDoublePositionX() + pos->GetPositionX()) * _day) < 0; // DA = -BC
|
||||
bool sign1 = ((-_b.GetPositionX() + pos->GetPositionX()) * _aby - (-_b.GetPositionY() + pos->GetPositionY()) * _abx) < 0;
|
||||
bool sign2 = ((-_a.GetPositionX() + pos->GetPositionX()) * _day - (-_a.GetPositionY() + pos->GetPositionY()) * _dax) < 0;
|
||||
bool sign3 = ((-_d.GetPositionY() + pos->GetPositionY()) * _abx - (-_d.GetPositionX() + pos->GetPositionX()) * _aby) < 0; // AB = -CD
|
||||
bool sign4 = ((-_c.GetPositionY() + pos->GetPositionY()) * _dax - (-_c.GetPositionX() + pos->GetPositionX()) * _day) < 0; // DA = -BC
|
||||
|
||||
// if all signs are equal, the point is inside
|
||||
return ((sign1 == sign2) && (sign2 == sign3) && (sign3 == sign4));
|
||||
@@ -85,9 +90,10 @@ bool ParallelogramBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||
// ---== Z RANGE ==---
|
||||
ZRangeBoundary::ZRangeBoundary(float minZ, float maxZ, bool isInverted) :
|
||||
AreaBoundary(isInverted), _minZ(minZ), _maxZ(maxZ) { }
|
||||
|
||||
bool ZRangeBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||
{
|
||||
return (_minZ <= pos->GetPositionZ() && pos->GetPositionZ() <= _maxZ);
|
||||
return pos->GetPositionZ() >= _minZ && pos->GetPositionZ() <= _maxZ;
|
||||
}
|
||||
|
||||
// ---== POLYGON ==---
|
||||
@@ -105,14 +111,16 @@ BoundaryUnionBoundary::BoundaryUnionBoundary(AreaBoundary const* b1, AreaBoundar
|
||||
{
|
||||
ASSERT(b1 && b2);
|
||||
}
|
||||
|
||||
BoundaryUnionBoundary::~BoundaryUnionBoundary()
|
||||
{
|
||||
delete _b1;
|
||||
delete _b2;
|
||||
}
|
||||
|
||||
bool BoundaryUnionBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||
{
|
||||
return (_b1->IsWithinBoundary(pos) || _b2->IsWithinBoundary(pos));
|
||||
return _b1->IsWithinBoundary(pos) || _b2->IsWithinBoundary(pos);
|
||||
}
|
||||
|
||||
// ---== INTERSECTION OF 2 BOUNDARIES ==---
|
||||
@@ -130,5 +138,5 @@ BoundaryIntersectionBoundary::~BoundaryIntersectionBoundary()
|
||||
|
||||
bool BoundaryIntersectionBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||
{
|
||||
return (_b1->IsWithinBoundary(pos) && _b2->IsWithinBoundary(pos));
|
||||
return _b1->IsWithinBoundary(pos) && _b2->IsWithinBoundary(pos);
|
||||
}
|
||||
|
||||
@@ -23,132 +23,103 @@
|
||||
|
||||
class TC_GAME_API AreaBoundary
|
||||
{
|
||||
public:
|
||||
bool IsWithinBoundary(Position const* pos) const { return pos && (IsWithinBoundaryArea(pos) != _isInvertedBoundary); }
|
||||
bool IsWithinBoundary(Position const& pos) const { return IsWithinBoundary(&pos); }
|
||||
public:
|
||||
bool IsWithinBoundary(Position const* pos) const { return pos && (IsWithinBoundaryArea(pos) != _isInvertedBoundary); }
|
||||
bool IsWithinBoundary(Position const& pos) const { return IsWithinBoundary(&pos); }
|
||||
|
||||
virtual ~AreaBoundary() { }
|
||||
AreaBoundary(AreaBoundary const&) = delete;
|
||||
AreaBoundary(AreaBoundary&&) = delete;
|
||||
AreaBoundary& operator=(AreaBoundary const&) = delete;
|
||||
AreaBoundary& operator=(AreaBoundary&&) = delete;
|
||||
|
||||
protected:
|
||||
explicit AreaBoundary(bool isInverted) : _isInvertedBoundary(isInverted) { }
|
||||
virtual ~AreaBoundary() = default;
|
||||
|
||||
struct DoublePosition : Position
|
||||
{
|
||||
DoublePosition(double x = 0.0, double y = 0.0, double z = 0.0, float o = 0.0f)
|
||||
: Position(float(x), float(y), float(z), o), DoublePosX(x), DoublePosY(y), DoublePosZ(z) { }
|
||||
protected:
|
||||
explicit AreaBoundary(bool isInverted) : _isInvertedBoundary(isInverted) { }
|
||||
|
||||
DoublePosition(float x, float y = 0.0f, float z = 0.0f, float o = 0.0f)
|
||||
: Position(x, y, z, o), DoublePosX(x), DoublePosY(y), DoublePosZ(z) { }
|
||||
virtual bool IsWithinBoundaryArea(Position const* pos) const = 0;
|
||||
|
||||
DoublePosition(Position const & pos)
|
||||
: Position(pos), DoublePosX(pos.m_positionX), DoublePosY(pos.m_positionY), DoublePosZ(pos.m_positionZ) { }
|
||||
|
||||
double GetDoublePositionX() const { return DoublePosX; }
|
||||
double GetDoublePositionY() const { return DoublePosY; }
|
||||
double GetDoublePositionZ() const { return DoublePosZ; }
|
||||
|
||||
double GetDoubleExactDist2dSq(DoublePosition const& pos) const {
|
||||
double const offX = GetDoublePositionX() - pos.GetDoublePositionX();
|
||||
double const offY = GetDoublePositionY() - pos.GetDoublePositionY();
|
||||
return (offX * offX) + (offY * offY);
|
||||
}
|
||||
|
||||
Position* sync()
|
||||
{
|
||||
m_positionX = float(DoublePosX);
|
||||
m_positionY = float(DoublePosY);
|
||||
m_positionZ = float(DoublePosZ);
|
||||
return this;
|
||||
}
|
||||
|
||||
double DoublePosX;
|
||||
double DoublePosY;
|
||||
double DoublePosZ;
|
||||
};
|
||||
|
||||
virtual bool IsWithinBoundaryArea(Position const* pos) const = 0;
|
||||
|
||||
private:
|
||||
bool _isInvertedBoundary;
|
||||
private:
|
||||
bool const _isInvertedBoundary;
|
||||
};
|
||||
|
||||
class TC_GAME_API RectangleBoundary : public AreaBoundary
|
||||
{
|
||||
public:
|
||||
// X axis is north/south, Y axis is east/west, larger values are northwest
|
||||
RectangleBoundary(float southX, float northX, float eastY, float westY, bool isInverted = false);
|
||||
public:
|
||||
// X axis is north/south, Y axis is east/west, larger values are northwest
|
||||
RectangleBoundary(float southX, float northX, float eastY, float westY, bool isInverted = false);
|
||||
|
||||
protected:
|
||||
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||
protected:
|
||||
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||
|
||||
private:
|
||||
float const _minX, _maxX, _minY, _maxY;
|
||||
private:
|
||||
float const _minX, _maxX, _minY, _maxY;
|
||||
};
|
||||
|
||||
class TC_GAME_API CircleBoundary : public AreaBoundary
|
||||
{
|
||||
public:
|
||||
CircleBoundary(Position const& center, double radius, bool isInverted = false);
|
||||
CircleBoundary(Position const& center, Position const& pointOnCircle, bool isInverted = false);
|
||||
public:
|
||||
CircleBoundary(Position const& center, float radius, bool isInverted = false);
|
||||
CircleBoundary(Position const& center, Position const& pointOnCircle, bool isInverted = false);
|
||||
|
||||
protected:
|
||||
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||
protected:
|
||||
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||
|
||||
private:
|
||||
DoublePosition const _center;
|
||||
double const _radiusSq;
|
||||
private:
|
||||
Position const _center;
|
||||
float const _radiusSq;
|
||||
};
|
||||
|
||||
class TC_GAME_API EllipseBoundary : public AreaBoundary
|
||||
{
|
||||
public:
|
||||
EllipseBoundary(Position const& center, double radiusX, double radiusY, bool isInverted = false);
|
||||
public:
|
||||
EllipseBoundary(Position const& center, float radiusX, float radiusY, bool isInverted = false);
|
||||
|
||||
protected:
|
||||
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||
protected:
|
||||
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||
|
||||
private:
|
||||
DoublePosition const _center;
|
||||
double const _radiusYSq, _scaleXSq;
|
||||
private:
|
||||
Position const _center;
|
||||
float const _radiusYSq, _scaleXSq;
|
||||
};
|
||||
|
||||
class TC_GAME_API TriangleBoundary : public AreaBoundary
|
||||
{
|
||||
public:
|
||||
TriangleBoundary(Position const& pointA, Position const& pointB, Position const& pointC, bool isInverted = false);
|
||||
public:
|
||||
TriangleBoundary(Position const& pointA, Position const& pointB, Position const& pointC, bool isInverted = false);
|
||||
|
||||
protected:
|
||||
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||
protected:
|
||||
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||
|
||||
private:
|
||||
DoublePosition const _a, _b, _c;
|
||||
double const _abx, _bcx, _cax, _aby, _bcy, _cay;
|
||||
private:
|
||||
Position const _a, _b, _c;
|
||||
float const _abx, _bcx, _cax, _aby, _bcy, _cay;
|
||||
};
|
||||
|
||||
class TC_GAME_API ParallelogramBoundary : public AreaBoundary
|
||||
{
|
||||
public:
|
||||
// Note: AB must be orthogonal to AD
|
||||
ParallelogramBoundary(Position const& cornerA, Position const& cornerB, Position const& cornerD, bool isInverted = false);
|
||||
public:
|
||||
// Note: AB must be orthogonal to AD
|
||||
ParallelogramBoundary(Position const& cornerA, Position const& cornerB, Position const& cornerD, bool isInverted = false);
|
||||
|
||||
protected:
|
||||
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||
protected:
|
||||
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||
|
||||
private:
|
||||
DoublePosition const _a, _b, _d, _c;
|
||||
double const _abx, _dax, _aby, _day;
|
||||
private:
|
||||
Position const _a, _b, _d, _c;
|
||||
float const _abx, _dax, _aby, _day;
|
||||
};
|
||||
|
||||
class TC_GAME_API ZRangeBoundary : public AreaBoundary
|
||||
{
|
||||
public:
|
||||
ZRangeBoundary(float minZ, float maxZ, bool isInverted = false);
|
||||
public:
|
||||
ZRangeBoundary(float minZ, float maxZ, bool isInverted = false);
|
||||
|
||||
protected:
|
||||
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||
protected:
|
||||
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||
|
||||
private:
|
||||
float const _minZ, _maxZ;
|
||||
private:
|
||||
float const _minZ, _maxZ;
|
||||
};
|
||||
|
||||
class TC_GAME_API PolygonBoundary : public AreaBoundary
|
||||
@@ -166,22 +137,30 @@ private:
|
||||
|
||||
class TC_GAME_API BoundaryUnionBoundary : public AreaBoundary
|
||||
{
|
||||
public:
|
||||
BoundaryUnionBoundary(AreaBoundary const* b1, AreaBoundary const* b2, bool isInverted = false);
|
||||
public:
|
||||
BoundaryUnionBoundary(AreaBoundary const* b1, AreaBoundary const* b2, bool isInverted = false);
|
||||
BoundaryUnionBoundary(BoundaryUnionBoundary const&) = delete;
|
||||
BoundaryUnionBoundary(BoundaryUnionBoundary&&) = delete;
|
||||
BoundaryUnionBoundary& operator=(BoundaryUnionBoundary const&) = delete;
|
||||
BoundaryUnionBoundary& operator=(BoundaryUnionBoundary&&) = delete;
|
||||
|
||||
protected:
|
||||
virtual ~BoundaryUnionBoundary();
|
||||
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||
protected:
|
||||
virtual ~BoundaryUnionBoundary();
|
||||
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||
|
||||
private:
|
||||
AreaBoundary const* const _b1;
|
||||
AreaBoundary const* const _b2;
|
||||
private:
|
||||
AreaBoundary const* const _b1;
|
||||
AreaBoundary const* const _b2;
|
||||
};
|
||||
|
||||
class TC_GAME_API BoundaryIntersectionBoundary : public AreaBoundary
|
||||
{
|
||||
public:
|
||||
BoundaryIntersectionBoundary(AreaBoundary const* b1, AreaBoundary const* b2, bool isInverted = false);
|
||||
BoundaryIntersectionBoundary(BoundaryIntersectionBoundary const&) = delete;
|
||||
BoundaryIntersectionBoundary(BoundaryIntersectionBoundary&&) = delete;
|
||||
BoundaryIntersectionBoundary& operator=(BoundaryIntersectionBoundary const&) = delete;
|
||||
BoundaryIntersectionBoundary& operator=(BoundaryIntersectionBoundary&&) = delete;
|
||||
|
||||
protected:
|
||||
virtual ~BoundaryIntersectionBoundary();
|
||||
|
||||
@@ -63,7 +63,7 @@ ObjectData const creatureData[] =
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
{ DATA_KALECGOS, new BoundaryUnionBoundary(new CircleBoundary(Position(1704.9f, 928.4f), 34.0), new RectangleBoundary(1689.2f, 1713.3f, 762.2f, 1074.8f)) }
|
||||
{ DATA_KALECGOS, new BoundaryUnionBoundary(new CircleBoundary(Position(1704.9f, 928.4f), 34.0f), new RectangleBoundary(1689.2f, 1713.3f, 762.2f, 1074.8f)) }
|
||||
};
|
||||
|
||||
DungeonEncounterData const encounters[] =
|
||||
|
||||
@@ -35,7 +35,7 @@ EndScriptData */
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
{ DATA_ONYXIA, new CircleBoundary(Position(-34.3697f, -212.3296f), 100.0) }
|
||||
{ DATA_ONYXIA, new CircleBoundary(Position(-34.3697f, -212.3296f), 100.0f) }
|
||||
};
|
||||
|
||||
DungeonEncounterData const encounters[] =
|
||||
|
||||
@@ -28,8 +28,8 @@ Position const HalionControllerSpawnPos = { 3156.037f, 533.2656f, 72.97205f, 0.0
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
{ DATA_GENERAL_ZARITHRIAN, new EllipseBoundary(Position(3013.409f, 529.492f), 45.0, 100.0) },
|
||||
{ DATA_HALION, new CircleBoundary(Position(3156.037f, 533.2656f), 52.5) }
|
||||
{ DATA_GENERAL_ZARITHRIAN, new EllipseBoundary(Position(3013.409f, 529.492f), 45.0f, 100.0f) },
|
||||
{ DATA_HALION, new CircleBoundary(Position(3156.037f, 533.2656f), 52.5f) }
|
||||
};
|
||||
|
||||
DoorData const doorData[] =
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
{ DATA_NORTHREND_BEASTS, new CircleBoundary(Position(563.26f, 139.6f), 75.0) },
|
||||
{ DATA_JARAXXUS, new CircleBoundary(Position(563.26f, 139.6f), 75.0) },
|
||||
{ DATA_FACTION_CRUSADERS, new CircleBoundary(Position(563.26f, 139.6f), 75.0) },
|
||||
{ DATA_TWIN_VALKIRIES, new CircleBoundary(Position(563.26f, 139.6f), 75.0) },
|
||||
{ DATA_ANUBARAK, new EllipseBoundary(Position(746.0f, 135.0f), 100.0, 75.0) }
|
||||
{ DATA_NORTHREND_BEASTS, new CircleBoundary(Position(563.26f, 139.6f), 75.0f) },
|
||||
{ DATA_JARAXXUS, new CircleBoundary(Position(563.26f, 139.6f), 75.0f) },
|
||||
{ DATA_FACTION_CRUSADERS, new CircleBoundary(Position(563.26f, 139.6f), 75.0f) },
|
||||
{ DATA_TWIN_VALKIRIES, new CircleBoundary(Position(563.26f, 139.6f), 75.0f) },
|
||||
{ DATA_ANUBARAK, new EllipseBoundary(Position(746.0f, 135.0f), 100.0f, 75.0f) }
|
||||
};
|
||||
|
||||
ObjectData const creatureData[] =
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
{ DATA_BRONJAHM, new CircleBoundary(Position(5297.3f, 2506.45f), 100.96) },
|
||||
{ DATA_BRONJAHM, new CircleBoundary(Position(5297.3f, 2506.45f), 100.96f) },
|
||||
{ DATA_DEVOURER_OF_SOULS, new ParallelogramBoundary(Position(5663.56f, 2570.53f), Position(5724.39f, 2520.45f), Position(5570.36f, 2461.42f)) }
|
||||
};
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ enum SpawnGroups
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
{ DATA_LORD_MARROWGAR, new CircleBoundary(Position(-428.0f,2211.0f), 95.0) },
|
||||
{ DATA_LORD_MARROWGAR, new CircleBoundary(Position(-428.0f,2211.0f), 95.0f) },
|
||||
{ DATA_LORD_MARROWGAR, new RectangleBoundary(-430.0f, -330.0f, 2110.0f, 2310.0f) },
|
||||
{ DATA_LADY_DEATHWHISPER, new RectangleBoundary(-670.0f, -520.0f, 2145.0f, 2280.0f) },
|
||||
{ DATA_DEATHBRINGER_SAURFANG, new RectangleBoundary(-565.0f, -465.0f, 2160.0f, 2260.0f) },
|
||||
@@ -66,12 +66,12 @@ BossBoundaryData const boundaries =
|
||||
{ DATA_FESTERGUT, new RectangleBoundary(4205.0f, 4325.0f, 3082.0f, 3195.0f) },
|
||||
{ DATA_PROFESSOR_PUTRICIDE, new ParallelogramBoundary(Position(4356.0f, 3290.0f), Position(4435.0f, 3194.0f), Position(4280.0f, 3194.0f)) },
|
||||
{ DATA_PROFESSOR_PUTRICIDE, new RectangleBoundary(4280.0f, 4435.0f, 3150.0f, 4360.0f) },
|
||||
{ DATA_BLOOD_PRINCE_COUNCIL, new EllipseBoundary(Position(4660.95f, 2769.194f), 85.0, 60.0) },
|
||||
{ DATA_BLOOD_QUEEN_LANA_THEL, new CircleBoundary(Position(4595.93f, 2769.365f), 64.0) },
|
||||
{ DATA_BLOOD_PRINCE_COUNCIL, new EllipseBoundary(Position(4660.95f, 2769.194f), 85.0f, 60.0f) },
|
||||
{ DATA_BLOOD_QUEEN_LANA_THEL, new CircleBoundary(Position(4595.93f, 2769.365f), 64.0f) },
|
||||
{ DATA_BLOOD_QUEEN_LANA_THEL, new ZRangeBoundary(391.78f, 473.43f) },
|
||||
{ DATA_SISTER_SVALNA, new RectangleBoundary(4291.0f, 4423.0f, 2438.0f, 2653.0f) },
|
||||
{ DATA_VALITHRIA_DREAMWALKER, new RectangleBoundary(4112.5f, 4293.5f, 2385.0f, 2585.0f) },
|
||||
{ DATA_SINDRAGOSA, new EllipseBoundary(Position(4408.6f, 2484.0f), 100.0, 75.0) }
|
||||
{ DATA_SINDRAGOSA, new EllipseBoundary(Position(4408.6f, 2484.0f), 100.0f, 75.0f) }
|
||||
};
|
||||
|
||||
DoorData const doorData[] =
|
||||
|
||||
@@ -49,14 +49,14 @@ BossBoundaryData const boundaries =
|
||||
{ BOSS_PATCHWERK, new CircleBoundary(Position(3130.8576f, -3210.36f), Position(3085.37f, -3219.85f), true) }, // entrance slime circle blocker
|
||||
{ BOSS_GROBBULUS, new CircleBoundary(Position(3204.0f, -3241.4f), 240.0f) },
|
||||
{ BOSS_GROBBULUS, new RectangleBoundary(3295.0f, 3340.0f, -3254.2f, -3230.18f, true) }, // entrance door blocker
|
||||
{ BOSS_GLUTH, new CircleBoundary(Position(3293.0f, -3142.0f), 80.0) },
|
||||
{ BOSS_GLUTH, new CircleBoundary(Position(3293.0f, -3142.0f), 80.0f) },
|
||||
{ BOSS_GLUTH, new ParallelogramBoundary(Position(3401.0f, -3149.0f), Position(3261.0f, -3028.0f), Position(3320.0f, -3267.0f)) },
|
||||
{ BOSS_GLUTH, new ZRangeBoundary(285.0f, 310.0f) },
|
||||
{ BOSS_THADDIUS, new ParallelogramBoundary(Position(3478.3f, -3070.0f), Position(3370.0f, -2961.5f), Position(3580.0f, -2961.5f)) },
|
||||
|
||||
/* Frostwyrm Lair */
|
||||
{ BOSS_SAPPHIRON, new CircleBoundary(Position(3517.627f, -5255.5f), 110.0) },
|
||||
{ BOSS_KELTHUZAD, new CircleBoundary(Position(3716.0f, -5107.0f), 85.0) }
|
||||
{ BOSS_SAPPHIRON, new CircleBoundary(Position(3517.627f, -5255.5f), 110.0f) },
|
||||
{ BOSS_KELTHUZAD, new CircleBoundary(Position(3716.0f, -5107.0f), 85.0f) }
|
||||
};
|
||||
|
||||
DoorData const doorData[] =
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
{ DATA_MALYGOS_EVENT, new CircleBoundary(Position(754.362f, 1301.609985f), 280.0) } // sanity check boundary
|
||||
{ DATA_MALYGOS_EVENT, new CircleBoundary(Position(754.362f, 1301.609985f), 280.0f) } // sanity check boundary
|
||||
};
|
||||
|
||||
DungeonEncounterData const encounters[] =
|
||||
|
||||
@@ -340,8 +340,8 @@ Position const ArenaCenter = { 2134.77f, -262.307f };
|
||||
// used for lightning field calculation
|
||||
Position const LightningFieldCenter = { 2135.178f, -321.122f };
|
||||
|
||||
CircleBoundary const ArenaFloorCircle(ArenaCenter, 45.4);
|
||||
CircleBoundary const InvertedBalconyCircle(LightningFieldCenter, 32.0, true);
|
||||
CircleBoundary const ArenaFloorCircle(ArenaCenter, 45.4f);
|
||||
CircleBoundary const InvertedBalconyCircle(LightningFieldCenter, 32.0f, true);
|
||||
|
||||
CreatureBoundary const ArenaBoundaries =
|
||||
{
|
||||
|
||||
@@ -34,15 +34,15 @@ static BossBoundaryData const boundaries =
|
||||
{ DATA_IGNIS, new RectangleBoundary(495.0f, 680.0f, 90.0f, 400.0f) },
|
||||
{ DATA_RAZORSCALE, new RectangleBoundary(370.0f, 810.0f, -542.0f, -55.0f) },
|
||||
{ DATA_XT002, new RectangleBoundary(755.0f, 940.0f, -125.0f, 95.0f) },
|
||||
{ DATA_ASSEMBLY_OF_IRON, new CircleBoundary(Position(1587.2f, 121.0f), 90.0) },
|
||||
{ DATA_ALGALON, new CircleBoundary(Position(1632.668f, -307.7656f), 45.0) },
|
||||
{ DATA_ASSEMBLY_OF_IRON, new CircleBoundary(Position(1587.2f, 121.0f), 90.0f) },
|
||||
{ DATA_ALGALON, new CircleBoundary(Position(1632.668f, -307.7656f), 45.0f) },
|
||||
{ DATA_ALGALON, new ZRangeBoundary(410.0f, 470.0f) },
|
||||
{ DATA_HODIR, new EllipseBoundary(Position(2001.5f, -240.0f), 50.0, 75.0) },
|
||||
{ DATA_HODIR, new EllipseBoundary(Position(2001.5f, -240.0f), 50.0f, 75.0f) },
|
||||
// Thorim sets boundaries dynamically
|
||||
{ DATA_FREYA, new RectangleBoundary(2094.6f, 2520.0f, -250.0f, 200.0f) },
|
||||
{ DATA_MIMIRON, new CircleBoundary(Position(2744.0f, 2569.0f), 70.0) },
|
||||
{ DATA_MIMIRON, new CircleBoundary(Position(2744.0f, 2569.0f), 70.0f) },
|
||||
{ DATA_VEZAX, new RectangleBoundary(1740.0f, 1930.0f, 31.0f, 228.0f) },
|
||||
{ DATA_YOGG_SARON, new CircleBoundary(Position(1980.42f, -27.68f), 105.0) }
|
||||
{ DATA_YOGG_SARON, new CircleBoundary(Position(1980.42f, -27.68f), 105.0f) }
|
||||
};
|
||||
|
||||
static DoorData const doorData[] =
|
||||
|
||||
@@ -43,17 +43,17 @@ DoorData const doorData[] =
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
{ DATA_HIGH_WARLORD_NAJENTUS, new RectangleBoundary(394.0f, 479.4f, 707.8f, 859.1f) },
|
||||
{ DATA_SUPREMUS, new RectangleBoundary(556.1f, 850.2f, 542.0f, 1001.0f) },
|
||||
{ DATA_SHADE_OF_AKAMA, new RectangleBoundary(406.8f, 564.0f, 327.9f, 473.5f) },
|
||||
{ DATA_TERON_GOREFIEND, new RectangleBoundary(512.5f, 613.3f, 373.2f, 432.0f) },
|
||||
{ DATA_TERON_GOREFIEND, new ZRangeBoundary(179.5f, 223.6f) },
|
||||
{ DATA_GURTOGG_BLOODBOIL, new RectangleBoundary(720.5f, 864.5f, 159.3f, 316.0f) },
|
||||
{ DATA_RELIQUARY_OF_SOULS, new RectangleBoundary(435.9f, 660.3f, 21.2f, 229.6f) },
|
||||
{ DATA_RELIQUARY_OF_SOULS, new ZRangeBoundary(81.8f, 148.0f) },
|
||||
{ DATA_MOTHER_SHAHRAZ, new RectangleBoundary(903.4f, 982.1f, 92.4f, 313.2f) },
|
||||
{ DATA_ILLIDARI_COUNCIL, new EllipseBoundary(Position(696.6f, 305.0f), 70.0 , 85.0) },
|
||||
{ DATA_ILLIDAN_STORMRAGE, new EllipseBoundary(Position(694.8f, 309.0f), 80.0 , 95.0) }
|
||||
{ DATA_HIGH_WARLORD_NAJENTUS, new RectangleBoundary(394.0f, 479.4f, 707.8f, 859.1f) },
|
||||
{ DATA_SUPREMUS, new RectangleBoundary(556.1f, 850.2f, 542.0f, 1001.0f) },
|
||||
{ DATA_SHADE_OF_AKAMA, new RectangleBoundary(406.8f, 564.0f, 327.9f, 473.5f) },
|
||||
{ DATA_TERON_GOREFIEND, new RectangleBoundary(512.5f, 613.3f, 373.2f, 432.0f) },
|
||||
{ DATA_TERON_GOREFIEND, new ZRangeBoundary(179.5f, 223.6f) },
|
||||
{ DATA_GURTOGG_BLOODBOIL, new RectangleBoundary(720.5f, 864.5f, 159.3f, 316.0f) },
|
||||
{ DATA_RELIQUARY_OF_SOULS, new RectangleBoundary(435.9f, 660.3f, 21.2f, 229.6f) },
|
||||
{ DATA_RELIQUARY_OF_SOULS, new ZRangeBoundary(81.8f, 148.0f) },
|
||||
{ DATA_MOTHER_SHAHRAZ, new RectangleBoundary(903.4f, 982.1f, 92.4f, 313.2f) },
|
||||
{ DATA_ILLIDARI_COUNCIL, new EllipseBoundary(Position(696.6f, 305.0f), 70.0f , 85.0f) },
|
||||
{ DATA_ILLIDAN_STORMRAGE, new EllipseBoundary(Position(694.8f, 309.0f), 80.0f , 95.0f) }
|
||||
};
|
||||
|
||||
ObjectData const creatureData[] =
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
{ DATA_MAGTHERIDON, new CircleBoundary(Position(-18.70f, 2.24f), 52.30) }
|
||||
{ DATA_MAGTHERIDON, new CircleBoundary(Position(-18.70f, 2.24f), 52.30f) }
|
||||
};
|
||||
|
||||
DoorData const doorData[] =
|
||||
|
||||
@@ -42,7 +42,7 @@ ObjectData const creatureData[] =
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
{ DATA_ANDUIN_WRYNN, new CircleBoundary({ -3825.0601f, -2715.4600f }, 45.0)},
|
||||
{ DATA_ANDUIN_WRYNN, new CircleBoundary({ -3825.0601f, -2715.4600f }, 45.0f)},
|
||||
};
|
||||
|
||||
DoorData const doorData[] =
|
||||
|
||||
Reference in New Issue
Block a user