From 67346f449ab347e47a23b25b5e851a8eef83dfc3 Mon Sep 17 00:00:00 2001 From: Rat Date: Mon, 25 Oct 2010 18:13:49 +0200 Subject: Core/Grids: implemented AllWorldObjectsInRange searcher, will be used in upcoming script engine --HG-- branch : trunk --- src/server/game/Grids/Notifiers/GridNotifiers.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') 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 -- cgit v1.2.3