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

#include <GridNotifiers.h>

Public Member Functions

 WorldObjectSearcher (WorldObject const *searcher, WorldObject *&result, Check &check, uint32 mapTypeMask=GRID_MAP_TYPE_MASK_ALL)
 
void Visit (GameObjectMapType &m)
 
void Visit (PlayerMapType &m)
 
void Visit (CreatureMapType &m)
 
void Visit (CorpseMapType &m)
 
void Visit (DynamicObjectMapType &m)
 
void Visit (AreaTriggerMapType &m)
 
template<class NOT_INTERESTED >
void Visit (GridRefManager< NOT_INTERESTED > &)
 

Public Attributes

WorldObject const_searcher
 
WorldObject *& i_object
 
Check & i_check
 
uint32 i_mapTypeMask
 

Constructor & Destructor Documentation

template<class Check>
Trinity::WorldObjectSearcher< Check >::WorldObjectSearcher ( WorldObject const searcher,
WorldObject *&  result,
Check &  check,
uint32  mapTypeMask = GRID_MAP_TYPE_MASK_ALL 
)
inline
184  : _searcher(searcher), i_object(result), i_check(check), i_mapTypeMask(mapTypeMask) { }
WorldObject const * _searcher
Definition: GridNotifiers.h:178
Check & i_check
Definition: GridNotifiers.h:180
WorldObject *& i_object
Definition: GridNotifiers.h:179
uint32 i_mapTypeMask
Definition: GridNotifiers.h:181
T check(T value)
Definition: format.h:305

Member Function Documentation

template<class Check >
void Trinity::WorldObjectSearcher< Check >::Visit ( GameObjectMapType m)
47 {
49  return;
50 
51  // already found
52  if (i_object)
53  return;
54 
55  for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
56  {
57  if (!itr->GetSource()->IsInPhase(_searcher))
58  continue;
59 
60  if (i_check(itr->GetSource()))
61  {
62  i_object = itr->GetSource();
63  return;
64  }
65  }
66 }
WorldObject const * _searcher
Definition: GridNotifiers.h:178
Definition: GridDefines.h:76
Check & i_check
Definition: GridNotifiers.h:180
Definition: LinkedList.h:141
WorldObject *& i_object
Definition: GridNotifiers.h:179
iterator begin()
Definition: GridRefManager.h:36
uint32 i_mapTypeMask
Definition: GridNotifiers.h:181
iterator end()
Definition: GridRefManager.h:37

+ Here is the call graph for this function:

template<class Check >
void Trinity::WorldObjectSearcher< Check >::Visit ( PlayerMapType m)
70 {
72  return;
73 
74  // already found
75  if (i_object)
76  return;
77 
78  for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
79  {
80  if (!itr->GetSource()->IsInPhase(_searcher))
81  continue;
82 
83  if (i_check(itr->GetSource()))
84  {
85  i_object = itr->GetSource();
86  return;
87  }
88  }
89 }
WorldObject const * _searcher
Definition: GridNotifiers.h:178
Definition: GridDefines.h:77
Check & i_check
Definition: GridNotifiers.h:180
Definition: LinkedList.h:141
WorldObject *& i_object
Definition: GridNotifiers.h:179
iterator begin()
Definition: GridRefManager.h:36
uint32 i_mapTypeMask
Definition: GridNotifiers.h:181
iterator end()
Definition: GridRefManager.h:37

+ Here is the call graph for this function:

template<class Check >
void Trinity::WorldObjectSearcher< Check >::Visit ( CreatureMapType m)
93 {
95  return;
96 
97  // already found
98  if (i_object)
99  return;
100 
101  for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
102  {
103  if (!itr->GetSource()->IsInPhase(_searcher))
104  continue;
105 
106  if (i_check(itr->GetSource()))
107  {
108  i_object = itr->GetSource();
109  return;
110  }
111  }
112 }
WorldObject const * _searcher
Definition: GridNotifiers.h:178
Check & i_check
Definition: GridNotifiers.h:180
Definition: LinkedList.h:141
WorldObject *& i_object
Definition: GridNotifiers.h:179
iterator begin()
Definition: GridRefManager.h:36
uint32 i_mapTypeMask
Definition: GridNotifiers.h:181
Definition: GridDefines.h:74
iterator end()
Definition: GridRefManager.h:37

+ Here is the call graph for this function:

template<class Check >
void Trinity::WorldObjectSearcher< Check >::Visit ( CorpseMapType m)
116 {
118  return;
119 
120  // already found
121  if (i_object)
122  return;
123 
124  for (CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
125  {
126  if (!itr->GetSource()->IsInPhase(_searcher))
127  continue;
128 
129  if (i_check(itr->GetSource()))
130  {
131  i_object = itr->GetSource();
132  return;
133  }
134  }
135 }
WorldObject const * _searcher
Definition: GridNotifiers.h:178
Check & i_check
Definition: GridNotifiers.h:180
Definition: LinkedList.h:141
WorldObject *& i_object
Definition: GridNotifiers.h:179
iterator begin()
Definition: GridRefManager.h:36
uint32 i_mapTypeMask
Definition: GridNotifiers.h:181
iterator end()
Definition: GridRefManager.h:37
Definition: GridDefines.h:73

+ Here is the call graph for this function:

template<class Check >
void Trinity::WorldObjectSearcher< Check >::Visit ( DynamicObjectMapType m)
139 {
141  return;
142 
143  // already found
144  if (i_object)
145  return;
146 
147  for (DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
148  {
149  if (!itr->GetSource()->IsInPhase(_searcher))
150  continue;
151 
152  if (i_check(itr->GetSource()))
153  {
154  i_object = itr->GetSource();
155  return;
156  }
157  }
158 }
WorldObject const * _searcher
Definition: GridNotifiers.h:178
Check & i_check
Definition: GridNotifiers.h:180
Definition: GridDefines.h:75
Definition: LinkedList.h:141
WorldObject *& i_object
Definition: GridNotifiers.h:179
iterator begin()
Definition: GridRefManager.h:36
uint32 i_mapTypeMask
Definition: GridNotifiers.h:181
iterator end()
Definition: GridRefManager.h:37

+ Here is the call graph for this function:

template<class Check >
void Trinity::WorldObjectSearcher< Check >::Visit ( AreaTriggerMapType m)
162 {
164  return;
165 
166  // already found
167  if (i_object)
168  return;
169 
170  for (AreaTriggerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
171  {
172  if (!itr->GetSource()->IsInPhase(_searcher))
173  continue;
174 
175  if (i_check(itr->GetSource()))
176  {
177  i_object = itr->GetSource();
178  return;
179  }
180  }
181 }
Definition: GridDefines.h:78
WorldObject const * _searcher
Definition: GridNotifiers.h:178
Check & i_check
Definition: GridNotifiers.h:180
Definition: LinkedList.h:141
WorldObject *& i_object
Definition: GridNotifiers.h:179
iterator begin()
Definition: GridRefManager.h:36
uint32 i_mapTypeMask
Definition: GridNotifiers.h:181
iterator end()
Definition: GridRefManager.h:37

+ Here is the call graph for this function:

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

Member Data Documentation

template<class Check>
WorldObject const* Trinity::WorldObjectSearcher< Check >::_searcher
template<class Check>
Check& Trinity::WorldObjectSearcher< Check >::i_check
template<class Check>
uint32 Trinity::WorldObjectSearcher< Check >::i_mapTypeMask
template<class Check>
WorldObject*& Trinity::WorldObjectSearcher< Check >::i_object

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