diff options
author | ModoX <moardox@gmail.com> | 2024-06-30 02:01:43 +0200 |
---|---|---|
committer | ModoX <moardox@gmail.com> | 2024-06-30 02:01:58 +0200 |
commit | f077b8608ca7c6aa80663e94f362f01d15041c7b (patch) | |
tree | 2d0067d32b30eb430fe0301327acc8a8ac52333d /src/server/game/Maps/AreaBoundary.cpp | |
parent | 486641063e9b88d84e38e4cee3bfc2fb3e0bffc6 (diff) |
Core/Maps: Implemented BoundaryIntersectionBoundary
Diffstat (limited to 'src/server/game/Maps/AreaBoundary.cpp')
-rw-r--r-- | src/server/game/Maps/AreaBoundary.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/server/game/Maps/AreaBoundary.cpp b/src/server/game/Maps/AreaBoundary.cpp index b0069da07cd..179070fcaed 100644 --- a/src/server/game/Maps/AreaBoundary.cpp +++ b/src/server/game/Maps/AreaBoundary.cpp @@ -105,3 +105,21 @@ bool BoundaryUnionBoundary::IsWithinBoundaryArea(Position const* pos) const { return (_b1->IsWithinBoundary(pos) || _b2->IsWithinBoundary(pos)); } + +// ---== INTERSECTION OF 2 BOUNDARIES ==--- +BoundaryIntersectionBoundary::BoundaryIntersectionBoundary(AreaBoundary const* b1, AreaBoundary const* b2, bool isInverted) : + AreaBoundary(isInverted), _b1(b1), _b2(b2) +{ + ASSERT(b1 && b2); +} + +BoundaryIntersectionBoundary::~BoundaryIntersectionBoundary() +{ + delete _b1; + delete _b2; +} + +bool BoundaryIntersectionBoundary::IsWithinBoundaryArea(Position const* pos) const +{ + return (_b1->IsWithinBoundary(pos) && _b2->IsWithinBoundary(pos)); +} |