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

#include "GridNotifiers.h"

Public Member Functions

 CreatureLastSearcher (WorldObject const *searcher, Creature *&result, Check &check)
 
void Visit (CreatureMapType &m)
 
template<class NOT_INTERESTED >
void Visit (GridRefMgr< NOT_INTERESTED > &)
 

Public Attributes

uint32 i_phaseMask
 
Creature *& i_object
 
Check & i_check
 

Detailed Description

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

Constructor & Destructor Documentation

◆ CreatureLastSearcher()

template<class Check >
Acore::CreatureLastSearcher< Check >::CreatureLastSearcher ( WorldObject const *  searcher,
Creature *&  result,
Check &  check 
)
inline
464 : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
Check & i_check
Definition: GridNotifiers.h:461
uint32 i_phaseMask
Definition: GridNotifiers.h:459
Creature *& i_object
Definition: GridNotifiers.h:460

Member Function Documentation

◆ Visit() [1/2]

template<class Check >
void Acore::CreatureLastSearcher< Check >::Visit ( CreatureMapType m)
457{
458 for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
459 {
460 if (!itr->GetSource()->InSamePhase(i_phaseMask))
461 continue;
462
463 if (i_check(itr->GetSource()))
464 i_object = itr->GetSource();
465 }
466}
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::CreatureLastSearcher< Check >::Visit ( GridRefMgr< NOT_INTERESTED > &  )
inline
468{}

Member Data Documentation

◆ i_check

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

◆ i_object

template<class Check >
Creature*& Acore::CreatureLastSearcher< Check >::i_object

◆ i_phaseMask

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