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

#include "GridNotifiers.h"

Public Member Functions

 WorldObjectLastSearcher (WorldObject const *searcher, WorldObject *&result, Check &check, 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
 
WorldObject *& i_object
 
Check & i_check
 

Detailed Description

template<class Check>
struct Acore::WorldObjectLastSearcher< Check >

Constructor & Destructor Documentation

◆ WorldObjectLastSearcher()

template<class Check >
Acore::WorldObjectLastSearcher< Check >::WorldObjectLastSearcher ( WorldObject const *  searcher,
WorldObject *&  result,
Check &  check,
uint32  mapTypeMask = GRID_MAP_TYPE_MASK_ALL 
)
inline
226 : i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
uint32 i_mapTypeMask
Definition: GridNotifiers.h:220
Check & i_check
Definition: GridNotifiers.h:223
WorldObject *& i_object
Definition: GridNotifiers.h:222
uint32 i_phaseMask
Definition: GridNotifiers.h:221

Member Function Documentation

◆ Visit() [1/6]

template<class Check >
void Acore::WorldObjectLastSearcher< Check >::Visit ( CorpseMapType m)
218{
220 return;
221
222 for (CorpseMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
223 {
224 if (!itr->GetSource()->InSamePhase(i_phaseMask))
225 continue;
226
227 if (i_check(itr->GetSource()))
228 i_object = itr->GetSource();
229 }
230}
@ 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(), and GRID_MAP_TYPE_MASK_CORPSE.

◆ Visit() [2/6]

template<class Check >
void Acore::WorldObjectLastSearcher< Check >::Visit ( CreatureMapType m)
202{
204 return;
205
206 for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
207 {
208 if (!itr->GetSource()->InSamePhase(i_phaseMask))
209 continue;
210
211 if (i_check(itr->GetSource()))
212 i_object = itr->GetSource();
213 }
214}
@ GRID_MAP_TYPE_MASK_CREATURE
Definition: GridDefines.h:70

References GridRefMgr< OBJECT >::begin(), GridRefMgr< OBJECT >::end(), and GRID_MAP_TYPE_MASK_CREATURE.

◆ Visit() [3/6]

template<class Check >
void Acore::WorldObjectLastSearcher< Check >::Visit ( DynamicObjectMapType m)
234{
236 return;
237
238 for (DynamicObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
239 {
240 if (!itr->GetSource()->InSamePhase(i_phaseMask))
241 continue;
242
243 if (i_check(itr->GetSource()))
244 i_object = itr->GetSource();
245 }
246}
@ GRID_MAP_TYPE_MASK_DYNAMICOBJECT
Definition: GridDefines.h:71

References GridRefMgr< OBJECT >::begin(), GridRefMgr< OBJECT >::end(), and GRID_MAP_TYPE_MASK_DYNAMICOBJECT.

◆ Visit() [4/6]

template<class Check >
void Acore::WorldObjectLastSearcher< Check >::Visit ( GameObjectMapType m)
170{
172 return;
173
174 for (GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
175 {
176 if (!itr->GetSource()->InSamePhase(i_phaseMask))
177 continue;
178
179 if (i_check(itr->GetSource()))
180 i_object = itr->GetSource();
181 }
182}
@ GRID_MAP_TYPE_MASK_GAMEOBJECT
Definition: GridDefines.h:72

References GridRefMgr< OBJECT >::begin(), GridRefMgr< OBJECT >::end(), and GRID_MAP_TYPE_MASK_GAMEOBJECT.

◆ Visit() [5/6]

template<class Check >
template<class NOT_INTERESTED >
void Acore::WorldObjectLastSearcher< Check >::Visit ( GridRefMgr< NOT_INTERESTED > &  )
inline
234{}

◆ Visit() [6/6]

template<class Check >
void Acore::WorldObjectLastSearcher< Check >::Visit ( PlayerMapType m)
186{
188 return;
189
190 for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
191 {
192 if (!itr->GetSource()->InSamePhase(i_phaseMask))
193 continue;
194
195 if (i_check(itr->GetSource()))
196 i_object = itr->GetSource();
197 }
198}
@ GRID_MAP_TYPE_MASK_PLAYER
Definition: GridDefines.h:73

References GridRefMgr< OBJECT >::begin(), GridRefMgr< OBJECT >::end(), and GRID_MAP_TYPE_MASK_PLAYER.

Member Data Documentation

◆ i_check

template<class Check >
Check& Acore::WorldObjectLastSearcher< Check >::i_check

◆ i_mapTypeMask

template<class Check >
uint32 Acore::WorldObjectLastSearcher< Check >::i_mapTypeMask

◆ i_object

template<class Check >
WorldObject*& Acore::WorldObjectLastSearcher< Check >::i_object

◆ i_phaseMask

template<class Check >
uint32 Acore::WorldObjectLastSearcher< Check >::i_phaseMask