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
547 : i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) {}
Check & i_check
Definition: GridNotifiers.h:544
uint32 i_phaseMask
Definition: GridNotifiers.h:542
std::list< Player * > & i_objects
Definition: GridNotifiers.h:543

Member Function Documentation

◆ Visit() [1/3]

template<class Check >
void Acore::PlayerListSearcherWithSharedVision< Check >::Visit ( CreatureMapType m)
493{
494 for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
495 if (itr->GetSource()->InSamePhase(i_phaseMask) && itr->GetSource()->HasSharedVision())
496 for (SharedVisionList::const_iterator i = itr->GetSource()->GetSharedVisionList().begin(); i != itr->GetSource()->GetSharedVisionList().end(); ++i)
497 if (i_check(*i, false))
498 i_objects.push_back(*i);
499}
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
552{}

◆ Visit() [3/3]

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

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