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)
214{
216 return;
217
218 for (CorpseMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
219 {
220 if (!itr->GetSource()->InSamePhase(i_phaseMask))
221 continue;
222
223 if (i_check(itr->GetSource()))
224 i_object = itr->GetSource();
225 }
226}
@ 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(), and GRID_MAP_TYPE_MASK_CORPSE.

◆ Visit() [2/6]

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

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)
230{
232 return;
233
234 for (DynamicObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
235 {
236 if (!itr->GetSource()->InSamePhase(i_phaseMask))
237 continue;
238
239 if (i_check(itr->GetSource()))
240 i_object = itr->GetSource();
241 }
242}
@ GRID_MAP_TYPE_MASK_DYNAMICOBJECT
Definition: GridDefines.h:70

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)
166{
168 return;
169
170 for (GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
171 {
172 if (!itr->GetSource()->InSamePhase(i_phaseMask))
173 continue;
174
175 if (i_check(itr->GetSource()))
176 i_object = itr->GetSource();
177 }
178}
@ GRID_MAP_TYPE_MASK_GAMEOBJECT
Definition: GridDefines.h:71

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)
182{
184 return;
185
186 for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
187 {
188 if (!itr->GetSource()->InSamePhase(i_phaseMask))
189 continue;
190
191 if (i_check(itr->GetSource()))
192 i_object = itr->GetSource();
193 }
194}
@ GRID_MAP_TYPE_MASK_PLAYER
Definition: GridDefines.h:72

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