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
559 : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check)
560 {
561 }
Player *& i_object
Definition: GridNotifiers.h:556
Check & i_check
Definition: GridNotifiers.h:557
uint32 i_phaseMask
Definition: GridNotifiers.h:555

Member Function Documentation

◆ Visit() [1/2]

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

◆ Visit() [2/2]

template<class Check >
void Acore::PlayerLastSearcher< Check >::Visit ( PlayerMapType m)
527{
528 for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
529 {
530 if (!itr->GetSource()->InSamePhase(i_phaseMask))
531 continue;
532
533 if (i_check(itr->GetSource()))
534 i_object = itr->GetSource();
535 }
536}
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