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

#include <GridNotifiers.h>

Public Member Functions

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

Public Attributes

WorldObject const_searcher
 
Unit *& i_object
 
Check & i_check
 

Constructor & Destructor Documentation

template<class Check>
Trinity::UnitLastSearcher< Check >::UnitLastSearcher ( WorldObject const searcher,
Unit *&  result,
Check &  check 
)
inline
400  : _searcher(searcher), i_object(result), i_check(check) { }
Check & i_check
Definition: GridNotifiers.h:397
Unit *& i_object
Definition: GridNotifiers.h:396
WorldObject const * _searcher
Definition: GridNotifiers.h:395
T check(T value)
Definition: format.h:305

Member Function Documentation

template<class Check >
void Trinity::UnitLastSearcher< Check >::Visit ( CreatureMapType m)
433 {
434  for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
435  {
436  if (!itr->GetSource()->IsInPhase(_searcher))
437  continue;
438 
439  if (i_check(itr->GetSource()))
440  i_object = itr->GetSource();
441  }
442 }
Check & i_check
Definition: GridNotifiers.h:397
Unit *& i_object
Definition: GridNotifiers.h:396
WorldObject const * _searcher
Definition: GridNotifiers.h:395
Definition: LinkedList.h:141
iterator begin()
Definition: GridRefManager.h:36
iterator end()
Definition: GridRefManager.h:37

+ Here is the call graph for this function:

template<class Check >
void Trinity::UnitLastSearcher< Check >::Visit ( PlayerMapType m)
446 {
447  for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
448  {
449  if (!itr->GetSource()->IsInPhase(_searcher))
450  continue;
451 
452  if (i_check(itr->GetSource()))
453  i_object = itr->GetSource();
454  }
455 }
Check & i_check
Definition: GridNotifiers.h:397
Unit *& i_object
Definition: GridNotifiers.h:396
WorldObject const * _searcher
Definition: GridNotifiers.h:395
Definition: LinkedList.h:141
iterator begin()
Definition: GridRefManager.h:36
iterator end()
Definition: GridRefManager.h:37

+ Here is the call graph for this function:

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

Member Data Documentation

template<class Check>
WorldObject const* Trinity::UnitLastSearcher< Check >::_searcher
template<class Check>
Check& Trinity::UnitLastSearcher< Check >::i_check
template<class Check>
Unit* & Trinity::UnitLastSearcher< Check >::i_object

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