AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::PlayerDistWorker< Do > Struct Template Reference

#include "GridNotifiers.h"

Public Member Functions

 PlayerDistWorker (WorldObject const *searcher, float _dist, Do &_do)
 
void Visit (PlayerMapType &m)
 
template<class NOT_INTERESTED >
void Visit (GridRefMgr< NOT_INTERESTED > &)
 

Public Attributes

WorldObject const * i_searcher
 
float i_dist
 
Do & i_do
 

Detailed Description

template<class Do>
struct Acore::PlayerDistWorker< Do >

Constructor & Destructor Documentation

◆ PlayerDistWorker()

template<class Do >
Acore::PlayerDistWorker< Do >::PlayerDistWorker ( WorldObject const *  searcher,
float  _dist,
Do &  _do 
)
inline
598 : i_searcher(searcher), i_dist(_dist), i_do(_do) {}
Do & i_do
Definition: GridNotifiers.h:595
WorldObject const * i_searcher
Definition: GridNotifiers.h:593
float i_dist
Definition: GridNotifiers.h:594

Member Function Documentation

◆ Visit() [1/2]

template<class Do >
template<class NOT_INTERESTED >
void Acore::PlayerDistWorker< Do >::Visit ( GridRefMgr< NOT_INTERESTED > &  )
inline
607{}

◆ Visit() [2/2]

template<class Do >
void Acore::PlayerDistWorker< Do >::Visit ( PlayerMapType m)
inline
601 {
602 for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
603 if (itr->GetSource()->HaveAtClient(i_searcher) && itr->GetSource()->IsWithinDist(i_searcher, i_dist))
604 i_do(itr->GetSource());
605 }
Definition: LinkedList.h:139
iterator begin()
Definition: GridRefMgr.h:35
iterator end()
Definition: GridRefMgr.h:36

References GridRefMgr< OBJECT >::begin(), GridRefMgr< OBJECT >::end(), Acore::PlayerDistWorker< Do >::i_dist, Acore::PlayerDistWorker< Do >::i_do, and Acore::PlayerDistWorker< Do >::i_searcher.

Member Data Documentation

◆ i_dist

template<class Do >
float Acore::PlayerDistWorker< Do >::i_dist

◆ i_do

template<class Do >
Do& Acore::PlayerDistWorker< Do >::i_do

◆ i_searcher

template<class Do >
WorldObject const* Acore::PlayerDistWorker< Do >::i_searcher