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

#include "GridNotifiers.h"

Public Member Functions

 PlayerLastSearcher (WorldObject const *searcher, Player *&result, Check &check)
 
void Visit (PlayerMapType &m)
 
template<class NOT_INTERESTED >
void Visit (GridRefMgr< NOT_INTERESTED > &)
 

Public Attributes

uint32 i_phaseMask
 
Player *& i_object
 
Check & i_check
 

Detailed Description

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

Constructor & Destructor Documentation

◆ PlayerLastSearcher()

template<class Check >
Acore::PlayerLastSearcher< Check >::PlayerLastSearcher ( WorldObject const *  searcher,
Player *&  result,
Check &  check 
)
inline
562 : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check)
563 {
564 }
Player *& i_object
Definition: GridNotifiers.h:559
Check & i_check
Definition: GridNotifiers.h:560
uint32 i_phaseMask
Definition: GridNotifiers.h:558

Member Function Documentation

◆ Visit() [1/2]

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

◆ Visit() [2/2]

template<class Check >
void Acore::PlayerLastSearcher< Check >::Visit ( PlayerMapType m)
523{
524 for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
525 {
526 if (!itr->GetSource()->InSamePhase(i_phaseMask))
527 continue;
528
529 if (i_check(itr->GetSource()))
530 i_object = itr->GetSource();
531 }
532}
Definition: LinkedList.h:139
iterator begin()
Definition: GridRefMgr.h:35
iterator end()
Definition: GridRefMgr.h:36

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

Member Data Documentation

◆ i_check

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

◆ i_object

template<class Check >
Player*& Acore::PlayerLastSearcher< Check >::i_object

◆ i_phaseMask

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