TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Trinity::PlayerSearcher< Check > Struct Template Reference

#include <GridNotifiers.h>

Public Member Functions

 PlayerSearcher (WorldObject const *searcher, Player *&result, Check &check)
 
void Visit (PlayerMapType &m)
 
template<class NOT_INTERESTED >
void Visit (GridRefManager< NOT_INTERESTED > &)
 

Public Attributes

WorldObject const_searcher
 
Player *& i_object
 
Check & i_check
 

Constructor & Destructor Documentation

template<class Check>
Trinity::PlayerSearcher< Check >::PlayerSearcher ( WorldObject const searcher,
Player *&  result,
Check &  check 
)
inline
502  : _searcher(searcher), i_object(result), i_check(check) { }
Player *& i_object
Definition: GridNotifiers.h:498
Check & i_check
Definition: GridNotifiers.h:499
T check(T value)
Definition: format.h:305
WorldObject const * _searcher
Definition: GridNotifiers.h:497

Member Function Documentation

template<class Check >
void Trinity::PlayerSearcher< Check >::Visit ( PlayerMapType m)
530 {
531  // already found
532  if (i_object)
533  return;
534 
535  for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
536  {
537  if (!itr->GetSource()->IsInPhase(_searcher))
538  continue;
539 
540  if (i_check(itr->GetSource()))
541  {
542  i_object = itr->GetSource();
543  return;
544  }
545  }
546 }
Player *& i_object
Definition: GridNotifiers.h:498
Check & i_check
Definition: GridNotifiers.h:499
Definition: LinkedList.h:141
iterator begin()
Definition: GridRefManager.h:36
iterator end()
Definition: GridRefManager.h:37
WorldObject const * _searcher
Definition: GridNotifiers.h:497

+ Here is the call graph for this function:

template<class Check>
template<class NOT_INTERESTED >
void Trinity::PlayerSearcher< Check >::Visit ( GridRefManager< NOT_INTERESTED > &  )
inline
506 { }

Member Data Documentation

template<class Check>
WorldObject const* Trinity::PlayerSearcher< Check >::_searcher
template<class Check>
Check& Trinity::PlayerSearcher< Check >::i_check
template<class Check>
Player* & Trinity::PlayerSearcher< Check >::i_object

The documentation for this struct was generated from the following files: