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

#include "GridNotifiers.h"

Public Member Functions

 AllWorldObjectsInRange (WorldObject const *object, float maxRange)
 
bool operator() (WorldObject *go)
 

Private Attributes

WorldObject const * m_pObject
 
float m_fRange
 

Detailed Description

Constructor & Destructor Documentation

◆ AllWorldObjectsInRange()

Acore::AllWorldObjectsInRange::AllWorldObjectsInRange ( WorldObject const *  object,
float  maxRange 
)
inline
1584: m_pObject(object), m_fRange(maxRange) {}
float m_fRange
Definition: GridNotifiers.h:1591
WorldObject const * m_pObject
Definition: GridNotifiers.h:1590

Member Function Documentation

◆ operator()()

bool Acore::AllWorldObjectsInRange::operator() ( WorldObject go)
inline
1586 {
1587 return m_pObject->IsWithinDist(go, m_fRange, false) && m_pObject->InSamePhase(go);
1588 }
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool useBoundingRadius=true) const
Definition: Object.cpp:1316
bool InSamePhase(WorldObject const *obj) const
Definition: Object.h:435

References WorldObject::InSamePhase(), WorldObject::IsWithinDist(), m_fRange, and m_pObject.

Member Data Documentation

◆ m_fRange

float Acore::AllWorldObjectsInRange::m_fRange
private

Referenced by operator()().

◆ m_pObject

WorldObject const* Acore::AllWorldObjectsInRange::m_pObject
private

Referenced by operator()().