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

#include "GridNotifiers.h"

Public Member Functions

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

Public Attributes

uint32 i_phaseMask
 
Do & i_do
 

Detailed Description

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

Constructor & Destructor Documentation

◆ PlayerWorker()

template<class Do >
Acore::PlayerWorker< Do >::PlayerWorker ( WorldObject const *  searcher,
Do &  _do 
)
inline
575 : i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {}
uint32 i_phaseMask
Definition: GridNotifiers.h:571
Do & i_do
Definition: GridNotifiers.h:572

Member Function Documentation

◆ Visit() [1/2]

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

◆ Visit() [2/2]

template<class Do >
void Acore::PlayerWorker< Do >::Visit ( PlayerMapType m)
inline
578 {
579 for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
580 if (itr->GetSource()->InSamePhase(i_phaseMask))
581 i_do(itr->GetSource());
582 }
Definition: LinkedList.h:139
iterator begin()
Definition: GridRefMgr.h:35
iterator end()
Definition: GridRefMgr.h:36

References GridRefMgr< OBJECT >::begin(), GridRefMgr< OBJECT >::end(), Acore::PlayerWorker< Do >::i_do, and Acore::PlayerWorker< Do >::i_phaseMask.

Member Data Documentation

◆ i_do

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

◆ i_phaseMask

template<class Do >
uint32 Acore::PlayerWorker< Do >::i_phaseMask