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

#include <GridNotifiers.h>

Public Member Functions

 PlayerRelocationNotifier (Player &player)
 
template<class T >
void Visit (GridRefManager< T > &m)
 
void Visit (CreatureMapType &)
 
void Visit (PlayerMapType &)
 
- Public Member Functions inherited from Trinity::VisibleNotifier
 VisibleNotifier (Player &player)
 
template<class T >
void Visit (GridRefManager< T > &m)
 
void SendToSelf (void)
 

Additional Inherited Members

- Public Attributes inherited from Trinity::VisibleNotifier
Player & i_player
 
UpdateData i_data
 
std::set< Unit * > i_visibleNow
 
GuidUnorderedSet vis_guids
 

Constructor & Destructor Documentation

Trinity::PlayerRelocationNotifier::PlayerRelocationNotifier ( Player &  player)
inline
68 : VisibleNotifier(player) { }
VisibleNotifier(Player &player)
Definition: GridNotifiers.h:50

Member Function Documentation

template<class T >
void Trinity::PlayerRelocationNotifier::Visit ( GridRefManager< T > &  m)
inline
void Visit(GridRefManager< T > &m)
Definition: GridNotifiersImpl.h:32

+ Here is the call graph for this function:

void PlayerRelocationNotifier::Visit ( CreatureMapType m)
162 {
163  bool relocated_for_ai = (&i_player == i_player.m_seer);
164 
165  for (CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
166  {
167  Creature* c = iter->GetSource();
168 
169  vis_guids.erase(c->GetGUID());
170 
171  i_player.UpdateVisibilityOf(c, i_data, i_visibleNow);
172 
173  if (relocated_for_ai && !c->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
175  }
176 }
Definition: Object.h:74
UpdateData i_data
Definition: GridNotifiers.h:46
void CreatureUnitRelocationWorker(Creature *c, Unit *u)
Definition: GridNotifiers.cpp:129
bool isNeedNotify(uint16 f) const
Definition: Object.h:575
Definition: Creature.h:467
Definition: LinkedList.h:141
Player & i_player
Definition: GridNotifiers.h:45
iterator begin()
Definition: GridRefManager.h:36
ObjectGuid const & GetGUID() const
Definition: Object.h:105
std::set< Unit * > i_visibleNow
Definition: GridNotifiers.h:47
GuidUnorderedSet vis_guids
Definition: GridNotifiers.h:48
iterator end()
Definition: GridRefManager.h:37

+ Here is the call graph for this function:

void PlayerRelocationNotifier::Visit ( PlayerMapType m)
145 {
146  for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
147  {
148  Player* player = iter->GetSource();
149 
150  vis_guids.erase(player->GetGUID());
151 
152  i_player.UpdateVisibilityOf(player, i_data, i_visibleNow);
153 
154  if (player->m_seer->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
155  continue;
156 
157  player->UpdateVisibilityOf(&i_player);
158  }
159 }
Definition: Object.h:74
UpdateData i_data
Definition: GridNotifiers.h:46
Definition: LinkedList.h:141
Player & i_player
Definition: GridNotifiers.h:45
iterator begin()
Definition: GridRefManager.h:36
std::set< Unit * > i_visibleNow
Definition: GridNotifiers.h:47
GuidUnorderedSet vis_guids
Definition: GridNotifiers.h:48
iterator end()
Definition: GridRefManager.h:37

+ Here is the call graph for this function:


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