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

#include "GridNotifiers.h"

Inheritance diagram for Acore::CreatureListSearcher< Check >:
Acore::ContainerInserter< Creature * >

Public Member Functions

template<typename Container >
 CreatureListSearcher (WorldObject const *searcher, Container &container, Check &check)
 
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< Creature * >
 ContainerInserter (T &ref_)
 
void Insert (Creature * type)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ CreatureListSearcher()

template<class Check >
template<typename Container >
Acore::CreatureListSearcher< Check >::CreatureListSearcher ( WorldObject const *  searcher,
Container container,
Check &  check 
)
inline
476 : ContainerInserter<Creature*>(container),
477 i_phaseMask(searcher->GetPhaseMask()), i_check(check) { }
uint32 i_phaseMask
Definition: GridNotifiers.h:471
Check & i_check
Definition: GridNotifiers.h:472

Member Function Documentation

◆ Visit() [1/2]

template<class Check >
void Acore::CreatureListSearcher< Check >::Visit ( CreatureMapType m)
470{
471 for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
472 if (itr->GetSource()->InSamePhase(i_phaseMask))
473 if (i_check(itr->GetSource()))
474 Insert(itr->GetSource());
475}
Definition: LinkedList.h:139
iterator begin()
Definition: GridRefMgr.h:35
iterator end()
Definition: GridRefMgr.h:36
void Insert(Creature * type)
Definition: GridNotifiers.h:188

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

◆ Visit() [2/2]

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

Member Data Documentation

◆ i_check

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

◆ i_phaseMask

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