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

#include "GridNotifiers.h"

Public Member Functions

 WorldObjectWorker (WorldObject const *searcher, Do const &_do, uint32 mapTypeMask=GRID_MAP_TYPE_MASK_ALL)
 
void Visit (GameObjectMapType &m)
 
void Visit (PlayerMapType &m)
 
void Visit (CreatureMapType &m)
 
void Visit (CorpseMapType &m)
 
void Visit (DynamicObjectMapType &m)
 
template<class NOT_INTERESTED >
void Visit (GridRefMgr< NOT_INTERESTED > &)
 

Public Attributes

uint32 i_mapTypeMask
 
uint32 i_phaseMask
 
Do const & i_do
 

Detailed Description

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

Constructor & Destructor Documentation

◆ WorldObjectWorker()

template<class Do >
Acore::WorldObjectWorker< Do >::WorldObjectWorker ( WorldObject const *  searcher,
Do const &  _do,
uint32  mapTypeMask = GRID_MAP_TYPE_MASK_ALL 
)
inline
263 : i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {}
uint32 i_mapTypeMask
Definition: GridNotifiers.h:258
Do const & i_do
Definition: GridNotifiers.h:260
uint32 i_phaseMask
Definition: GridNotifiers.h:259

Member Function Documentation

◆ Visit() [1/6]

template<class Do >
void Acore::WorldObjectWorker< Do >::Visit ( CorpseMapType m)
inline
292 {
294 return;
295 for (CorpseMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
296 if (itr->GetSource()->InSamePhase(i_phaseMask))
297 i_do(itr->GetSource());
298 }
@ GRID_MAP_TYPE_MASK_CORPSE
Definition: GridDefines.h:69
Definition: LinkedList.h:139
iterator begin()
Definition: GridRefMgr.h:35
iterator end()
Definition: GridRefMgr.h:36

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

◆ Visit() [2/6]

template<class Do >
void Acore::WorldObjectWorker< Do >::Visit ( CreatureMapType m)
inline
283 {
285 return;
286 for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
287 if (itr->GetSource()->InSamePhase(i_phaseMask))
288 i_do(itr->GetSource());
289 }
@ GRID_MAP_TYPE_MASK_CREATURE
Definition: GridDefines.h:70

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

◆ Visit() [3/6]

template<class Do >
void Acore::WorldObjectWorker< Do >::Visit ( DynamicObjectMapType m)
inline
301 {
303 return;
304 for (DynamicObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
305 if (itr->GetSource()->InSamePhase(i_phaseMask))
306 i_do(itr->GetSource());
307 }
@ GRID_MAP_TYPE_MASK_DYNAMICOBJECT
Definition: GridDefines.h:71

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

◆ Visit() [4/6]

template<class Do >
void Acore::WorldObjectWorker< Do >::Visit ( GameObjectMapType m)
inline
266 {
268 return;
269 for (GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
270 if (itr->GetSource()->InSamePhase(i_phaseMask))
271 i_do(itr->GetSource());
272 }
@ GRID_MAP_TYPE_MASK_GAMEOBJECT
Definition: GridDefines.h:72

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

◆ Visit() [5/6]

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

◆ Visit() [6/6]

template<class Do >
void Acore::WorldObjectWorker< Do >::Visit ( PlayerMapType m)
inline
275 {
277 return;
278 for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
279 if (itr->GetSource()->InSamePhase(i_phaseMask))
280 i_do(itr->GetSource());
281 }
@ GRID_MAP_TYPE_MASK_PLAYER
Definition: GridDefines.h:73

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

Member Data Documentation

◆ i_do

template<class Do >
Do const& Acore::WorldObjectWorker< Do >::i_do

◆ i_mapTypeMask

template<class Do >
uint32 Acore::WorldObjectWorker< Do >::i_mapTypeMask

◆ i_phaseMask

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