[11962] Add support for Creature List of Entry in Range grid searcher

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
Schmoozerd 2012-04-15 02:18:32 +02:00
parent 254a35d6a1
commit 110c16de13
2 changed files with 23 additions and 1 deletions

View file

@ -1153,6 +1153,28 @@ namespace MaNGOS
NearestCreatureEntryWithLiveStateInObjectRangeCheck(NearestCreatureEntryWithLiveStateInObjectRangeCheck const&); NearestCreatureEntryWithLiveStateInObjectRangeCheck(NearestCreatureEntryWithLiveStateInObjectRangeCheck const&);
}; };
class AllCreaturesOfEntryInRangeCheck
{
public:
AllCreaturesOfEntryInRangeCheck(const WorldObject* pObject, uint32 uiEntry, float fMaxRange) : m_pObject(pObject), m_uiEntry(uiEntry), m_fRange(fMaxRange) {}
WorldObject const& GetFocusObject() const { return *m_pObject; }
bool operator() (Unit* pUnit)
{
if (pUnit->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(pUnit,m_fRange,false))
return true;
return false;
}
private:
const WorldObject* m_pObject;
uint32 m_uiEntry;
float m_fRange;
// prevent clone this object
AllCreaturesOfEntryInRangeCheck(AllCreaturesOfEntryInRangeCheck const&);
};
// Player checks and do // Player checks and do
class AnyPlayerInObjectRangeCheck class AnyPlayerInObjectRangeCheck

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "11961" #define REVISION_NR "11962"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__