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

#include "GridNotifiers.h"

Public Member Functions

 GameObjectLastSearcher (WorldObject const *searcher, GameObject *&result, Check &check)
 
void Visit (GameObjectMapType &m)
 
template<class NOT_INTERESTED >
void Visit (GridRefMgr< NOT_INTERESTED > &)
 

Public Attributes

uint32 i_phaseMask
 
GameObject *& i_object
 
Check & i_check
 

Detailed Description

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

Constructor & Destructor Documentation

◆ GameObjectLastSearcher()

template<class Check >
Acore::GameObjectLastSearcher< Check >::GameObjectLastSearcher ( WorldObject const *  searcher,
GameObject *&  result,
Check &  check 
)
inline
341 : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
Check & i_check
Definition: GridNotifiers.h:338
GameObject *& i_object
Definition: GridNotifiers.h:337
uint32 i_phaseMask
Definition: GridNotifiers.h:336

Member Function Documentation

◆ Visit() [1/2]

template<class Check >
void Acore::GameObjectLastSearcher< Check >::Visit ( GameObjectMapType m)
327{
328 for (GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
329 {
330 if (!itr->GetSource()->InSamePhase(i_phaseMask))
331 continue;
332
333 if (i_check(itr->GetSource()))
334 i_object = itr->GetSource();
335 }
336}
Definition: LinkedList.h:139
iterator begin()
Definition: GridRefMgr.h:35
iterator end()
Definition: GridRefMgr.h:36

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

◆ Visit() [2/2]

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

Member Data Documentation

◆ i_check

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

◆ i_object

template<class Check >
GameObject*& Acore::GameObjectLastSearcher< Check >::i_object

◆ i_phaseMask

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