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

#include "GridNotifiers.h"

Public Member Functions

 CreatureWorker (WorldObject const *searcher, Do &_do)
 
void Visit (CreatureMapType &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::CreatureWorker< Do >

Constructor & Destructor Documentation

◆ CreatureWorker()

template<class Do >
Acore::CreatureWorker< Do >::CreatureWorker ( WorldObject const *  searcher,
Do &  _do 
)
inline
491 : i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {}
Do & i_do
Definition: GridNotifiers.h:488
uint32 i_phaseMask
Definition: GridNotifiers.h:487

Member Function Documentation

◆ Visit() [1/2]

template<class Do >
void Acore::CreatureWorker< Do >::Visit ( CreatureMapType m)
inline
494 {
495 for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
496 if (itr->GetSource()->InSamePhase(i_phaseMask))
497 i_do(itr->GetSource());
498 }
Definition: LinkedList.h:139
iterator begin()
Definition: GridRefMgr.h:35
iterator end()
Definition: GridRefMgr.h:36

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

◆ Visit() [2/2]

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

Member Data Documentation

◆ i_do

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

◆ i_phaseMask

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