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
479 : ContainerInserter<Creature*>(container),
480 i_phaseMask(searcher->GetPhaseMask()), i_check(check) { }
uint32 i_phaseMask
Definition: GridNotifiers.h:474
Check & i_check
Definition: GridNotifiers.h:475

Member Function Documentation

◆ Visit() [1/2]

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

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
484{}

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