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
578 : i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {}
uint32 i_phaseMask
Definition: GridNotifiers.h:574
Do & i_do
Definition: GridNotifiers.h:575

Member Function Documentation

◆ Visit() [1/2]

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

◆ Visit() [2/2]

template<class Do >
void Acore::PlayerWorker< Do >::Visit ( PlayerMapType m)
inline
581 {
582 for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
583 if (itr->GetSource()->InSamePhase(i_phaseMask))
584 i_do(itr->GetSource());
585 }
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