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

#include "GridNotifiers.h"

Public Member Functions

 PlayerListSearcherWithSharedVision (WorldObject const *searcher, std::list< Player * > &objects, Check &check)
 
void Visit (PlayerMapType &m)
 
void Visit (CreatureMapType &m)
 
template<class NOT_INTERESTED >
void Visit (GridRefMgr< NOT_INTERESTED > &)
 

Public Attributes

uint32 i_phaseMask
 
std::list< Player * > & i_objects
 
Check & i_check
 

Detailed Description

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

Constructor & Destructor Documentation

◆ PlayerListSearcherWithSharedVision()

template<class Check >
Acore::PlayerListSearcherWithSharedVision< Check >::PlayerListSearcherWithSharedVision ( WorldObject const *  searcher,
std::list< Player * > &  objects,
Check &  check 
)
inline
544 : i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) {}
Check & i_check
Definition: GridNotifiers.h:541
uint32 i_phaseMask
Definition: GridNotifiers.h:539
std::list< Player * > & i_objects
Definition: GridNotifiers.h:540

Member Function Documentation

◆ Visit() [1/3]

template<class Check >
void Acore::PlayerListSearcherWithSharedVision< Check >::Visit ( CreatureMapType m)
497{
498 for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
499 if (itr->GetSource()->InSamePhase(i_phaseMask) && itr->GetSource()->HasSharedVision())
500 for (SharedVisionList::const_iterator i = itr->GetSource()->GetSharedVisionList().begin(); i != itr->GetSource()->GetSharedVisionList().end(); ++i)
501 if (i_check(*i, false))
502 i_objects.push_back(*i);
503}
Definition: LinkedList.h:139
iterator begin()
Definition: GridRefMgr.h:35
iterator end()
Definition: GridRefMgr.h:36

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

◆ Visit() [2/3]

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

◆ Visit() [3/3]

template<class Check >
void Acore::PlayerListSearcherWithSharedVision< Check >::Visit ( PlayerMapType m)
488{
489 for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
490 if (itr->GetSource()->InSamePhase(i_phaseMask))
491 if (i_check(itr->GetSource(), true))
492 i_objects.push_back(itr->GetSource());
493}

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

Member Data Documentation

◆ i_check

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

◆ i_objects

template<class Check >
std::list<Player*>& Acore::PlayerListSearcherWithSharedVision< Check >::i_objects

◆ i_phaseMask

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