AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::AllCreaturesOfEntryInRange Class Reference

#include "GridNotifiers.h"

Public Member Functions

 AllCreaturesOfEntryInRange (WorldObject const *object, uint32 entry, float maxRange)
 
bool operator() (Unit *unit)
 

Private Attributes

WorldObject const * m_pObject
 
uint32 m_uiEntry
 
float m_fRange
 

Detailed Description

Constructor & Destructor Documentation

◆ AllCreaturesOfEntryInRange()

Acore::AllCreaturesOfEntryInRange::AllCreaturesOfEntryInRange ( WorldObject const *  object,
uint32  entry,
float  maxRange 
)
inline
1459: m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) {}
float m_fRange
Definition: GridNotifiers.h:1471
uint32 m_uiEntry
Definition: GridNotifiers.h:1470
WorldObject const * m_pObject
Definition: GridNotifiers.h:1469

Member Function Documentation

◆ operator()()

bool Acore::AllCreaturesOfEntryInRange::operator() ( Unit unit)
inline
1461 {
1462 if (unit->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(unit, m_fRange, false))
1463 return true;
1464
1465 return false;
1466 }
uint32 GetEntry() const
Definition: Object.h:109
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool useBoundingRadius=true) const
Definition: Object.cpp:1316

References Object::GetEntry(), WorldObject::IsWithinDist(), m_fRange, m_pObject, and m_uiEntry.

Member Data Documentation

◆ m_fRange

float Acore::AllCreaturesOfEntryInRange::m_fRange
private

Referenced by operator()().

◆ m_pObject

WorldObject const* Acore::AllCreaturesOfEntryInRange::m_pObject
private

Referenced by operator()().

◆ m_uiEntry

uint32 Acore::AllCreaturesOfEntryInRange::m_uiEntry
private

Referenced by operator()().