TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Trinity::VisibleChangesNotifier Struct Reference

#include <GridNotifiers.h>

Public Member Functions

 VisibleChangesNotifier (WorldObject &object)
 
template<class T >
void Visit (GridRefManager< T > &)
 
void Visit (PlayerMapType &)
 
void Visit (CreatureMapType &)
 
void Visit (DynamicObjectMapType &)
 

Public Attributes

WorldObjecti_object
 

Constructor & Destructor Documentation

Trinity::VisibleChangesNotifier::VisibleChangesNotifier ( WorldObject object)
inlineexplicit
59 : i_object(object) { }
WorldObject & i_object
Definition: GridNotifiers.h:57

Member Function Documentation

template<class T >
void Trinity::VisibleChangesNotifier::Visit ( GridRefManager< T > &  )
inline
60 { }
void VisibleChangesNotifier::Visit ( PlayerMapType m)
90 {
91  for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
92  {
93  if (iter->GetSource() == &i_object)
94  continue;
95 
96  iter->GetSource()->UpdateVisibilityOf(&i_object);
97 
98  if (iter->GetSource()->HasSharedVision())
99  {
100  for (SharedVisionList::const_iterator i = iter->GetSource()->GetSharedVisionList().begin();
101  i != iter->GetSource()->GetSharedVisionList().end(); ++i)
102  {
103  if ((*i)->m_seer == iter->GetSource())
104  (*i)->UpdateVisibilityOf(&i_object);
105  }
106  }
107  }
108 }
Definition: LinkedList.h:141
iterator begin()
Definition: GridRefManager.h:36
WorldObject & i_object
Definition: GridNotifiers.h:57
iterator end()
Definition: GridRefManager.h:37

+ Here is the call graph for this function:

void VisibleChangesNotifier::Visit ( CreatureMapType m)
111 {
112  for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
113  if (iter->GetSource()->HasSharedVision())
114  for (SharedVisionList::const_iterator i = iter->GetSource()->GetSharedVisionList().begin();
115  i != iter->GetSource()->GetSharedVisionList().end(); ++i)
116  if ((*i)->m_seer == iter->GetSource())
117  (*i)->UpdateVisibilityOf(&i_object);
118 }
Definition: LinkedList.h:141
iterator begin()
Definition: GridRefManager.h:36
WorldObject & i_object
Definition: GridNotifiers.h:57
iterator end()
Definition: GridRefManager.h:37

+ Here is the call graph for this function:

void VisibleChangesNotifier::Visit ( DynamicObjectMapType m)
121 {
122  for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
123  if (Unit* caster = iter->GetSource()->GetCaster())
124  if (Player* player = caster->ToPlayer())
125  if (player->m_seer == iter->GetSource())
126  player->UpdateVisibilityOf(&i_object);
127 }
Definition: LinkedList.h:141
iterator begin()
Definition: GridRefManager.h:36
WorldObject & i_object
Definition: GridNotifiers.h:57
iterator end()
Definition: GridRefManager.h:37
Definition: Unit.h:1305

+ Here is the call graph for this function:

Member Data Documentation

WorldObject& Trinity::VisibleChangesNotifier::i_object

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