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

#include "GridNotifiers.h"

Public Member Functions

 AllGameObjectsMatchingOneEntryInRange (WorldObject const *object, std::vector< uint32 > entries, float maxRange)
 
bool operator() (GameObject *go)
 

Private Attributes

WorldObject const * m_pObject
 
std::vector< uint32m_uiEntries
 
float m_fRange
 

Detailed Description

Constructor & Destructor Documentation

◆ AllGameObjectsMatchingOneEntryInRange()

Acore::AllGameObjectsMatchingOneEntryInRange::AllGameObjectsMatchingOneEntryInRange ( WorldObject const *  object,
std::vector< uint32 entries,
float  maxRange 
)
inline
1453: m_pObject(object), m_uiEntries(entries), m_fRange(maxRange) {}
std::vector< uint32 > m_uiEntries
Definition GridNotifiers.h:1464
float m_fRange
Definition GridNotifiers.h:1465
WorldObject const * m_pObject
Definition GridNotifiers.h:1463

Member Function Documentation

◆ operator()()

bool Acore::AllGameObjectsMatchingOneEntryInRange::operator() ( GameObject go)
inline
1455 {
1456 if (std::ranges::any_of( m_uiEntries, [go](uint32 entry) { return go->GetEntry() == entry; }) && m_pObject->IsWithinDist(go, m_fRange, false))
1457 return true;
1458
1459 return false;
1460 }
std::uint32_t uint32
Definition Define.h:107
uint32 GetEntry() const
Definition Object.h:116
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool useBoundingRadius=true) const
Definition Object.cpp:1309

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

Member Data Documentation

◆ m_fRange

float Acore::AllGameObjectsMatchingOneEntryInRange::m_fRange
private

Referenced by operator()().

◆ m_pObject

WorldObject const* Acore::AllGameObjectsMatchingOneEntryInRange::m_pObject
private

Referenced by operator()().

◆ m_uiEntries

std::vector<uint32> Acore::AllGameObjectsMatchingOneEntryInRange::m_uiEntries
private

Referenced by operator()().


The documentation for this class was generated from the following file: