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
266 : i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {}
uint32 i_mapTypeMask
Definition: GridNotifiers.h:261
Do const & i_do
Definition: GridNotifiers.h:263
uint32 i_phaseMask
Definition: GridNotifiers.h:262

Member Function Documentation

◆ Visit() [1/6]

template<class Do >
void Acore::WorldObjectWorker< Do >::Visit ( CorpseMapType m)
inline
295 {
297 return;
298 for (CorpseMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
299 if (itr->GetSource()->InSamePhase(i_phaseMask))
300 i_do(itr->GetSource());
301 }
@ GRID_MAP_TYPE_MASK_CORPSE
Definition: GridDefines.h:68
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
286 {
288 return;
289 for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
290 if (itr->GetSource()->InSamePhase(i_phaseMask))
291 i_do(itr->GetSource());
292 }
@ GRID_MAP_TYPE_MASK_CREATURE
Definition: GridDefines.h:69

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
304 {
306 return;
307 for (DynamicObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
308 if (itr->GetSource()->InSamePhase(i_phaseMask))
309 i_do(itr->GetSource());
310 }
@ GRID_MAP_TYPE_MASK_DYNAMICOBJECT
Definition: GridDefines.h:70

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
269 {
271 return;
272 for (GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
273 if (itr->GetSource()->InSamePhase(i_phaseMask))
274 i_do(itr->GetSource());
275 }
@ GRID_MAP_TYPE_MASK_GAMEOBJECT
Definition: GridDefines.h:71

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
312{}

◆ Visit() [6/6]

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

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