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

#include "GridNotifiers.h"

Public Member Functions

 AllGameObjectsWithEntryInRange (WorldObject const *object, uint32 entry, float maxRange)
 
bool operator() (GameObject *go)
 

Private Attributes

WorldObject const * m_pObject
 
uint32 m_uiEntry
 
float m_fRange
 

Detailed Description

Constructor & Destructor Documentation

◆ AllGameObjectsWithEntryInRange()

Acore::AllGameObjectsWithEntryInRange::AllGameObjectsWithEntryInRange ( WorldObject const *  object,
uint32  entry,
float  maxRange 
)
inline
1442: m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) {}
WorldObject const * m_pObject
Definition: GridNotifiers.h:1451
uint32 m_uiEntry
Definition: GridNotifiers.h:1452
float m_fRange
Definition: GridNotifiers.h:1453

Member Function Documentation

◆ operator()()

bool Acore::AllGameObjectsWithEntryInRange::operator() ( GameObject go)
inline
1444 {
1445 if (go->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(go, m_fRange, false))
1446 return true;
1447
1448 return false;
1449 }
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::AllGameObjectsWithEntryInRange::m_fRange
private

Referenced by operator()().

◆ m_pObject

WorldObject const* Acore::AllGameObjectsWithEntryInRange::m_pObject
private

Referenced by operator()().

◆ m_uiEntry

uint32 Acore::AllGameObjectsWithEntryInRange::m_uiEntry
private

Referenced by operator()().