aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRat <none@none>2010-10-25 18:13:49 +0200
committerRat <none@none>2010-10-25 18:13:49 +0200
commit67346f449ab347e47a23b25b5e851a8eef83dfc3 (patch)
tree291cf60e71f597bc3fddad0d55a74a233e6b6738 /src
parent064b3fd2b36dcae8ee59f62c28868d3f2e548a8b (diff)
Core/Grids: implemented AllWorldObjectsInRange searcher, will be used in upcoming script engine
--HG-- branch : trunk
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Grids/Notifiers/GridNotifiers.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h
index bceb6e321b9..10f9e90b63e 100755
--- a/src/server/game/Grids/Notifiers/GridNotifiers.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.h
@@ -1214,6 +1214,19 @@ namespace Trinity
uint32 entry;
};
+ class AllWorldObjectsInRange
+ {
+ public:
+ AllWorldObjectsInRange(const WorldObject* pObject, float fMaxRange) : m_pObject(pObject), m_fRange(fMaxRange) {}
+ bool operator() (WorldObject* pGo)
+ {
+ return m_pObject->IsWithinDist(pGo, m_fRange, false);
+ }
+ private:
+ const WorldObject* m_pObject;
+ float m_fRange;
+ };
+
// Player checks and do
// Prepare using Builder localized packets with caching and send to player