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

#include "GridNotifiers.h"

Inheritance diagram for Acore::UnitListSearcher< Check >:
Acore::ContainerInserter< Unit * >

Public Member Functions

template<typename Container >
 UnitListSearcher (WorldObject const *searcher, Container &container, Check &check)
 
void Visit (PlayerMapType &m)
 
void Visit (CreatureMapType &m)
 
template<class NOT_INTERESTED >
void Visit (GridRefMgr< NOT_INTERESTED > &)
 

Public Attributes

uint32 i_phaseMask
 
Check & i_check
 

Additional Inherited Members

- Protected Member Functions inherited from Acore::ContainerInserter< Unit * >
 ContainerInserter (T &ref_)
 
void Insert (Unit * type)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ UnitListSearcher()

template<class Check >
template<typename Container >
Acore::UnitListSearcher< Check >::UnitListSearcher ( WorldObject const *  searcher,
Container container,
Check &  check 
)
inline
426 : ContainerInserter<Unit*>(container),
427 i_phaseMask(searcher->GetPhaseMask()), i_check(check) { }
uint32 i_phaseMask
Definition: GridNotifiers.h:421
Check & i_check
Definition: GridNotifiers.h:422

Member Function Documentation

◆ Visit() [1/3]

template<class Check >
void Acore::UnitListSearcher< Check >::Visit ( CreatureMapType m)
426{
427 for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
428 if (itr->GetSource()->InSamePhase(i_phaseMask))
429 if (i_check(itr->GetSource()))
430 Insert(itr->GetSource());
431}
Definition: LinkedList.h:139
iterator begin()
Definition: GridRefMgr.h:35
iterator end()
Definition: GridRefMgr.h:36
void Insert(Unit * type)
Definition: GridNotifiers.h:188

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

◆ Visit() [2/3]

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

◆ Visit() [3/3]

template<class Check >
void Acore::UnitListSearcher< Check >::Visit ( PlayerMapType m)
417{
418 for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
419 if (itr->GetSource()->InSamePhase(i_phaseMask))
420 if (i_check(itr->GetSource()))
421 Insert(itr->GetSource());
422}

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

Member Data Documentation

◆ i_check

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

◆ i_phaseMask

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