AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::CreatureRelocationNotifier Struct Reference

#include "GridNotifiers.h"

Public Member Functions

 CreatureRelocationNotifier (Creature &c)
 
template<class T >
void Visit (GridRefMgr< T > &)
 
void Visit (PlayerMapType &)
 

Public Attributes

Creaturei_creature
 

Detailed Description

Constructor & Destructor Documentation

◆ CreatureRelocationNotifier()

Acore::CreatureRelocationNotifier::CreatureRelocationNotifier ( Creature c)
inline
85: i_creature(c) {}
Creature & i_creature
Definition: GridNotifiers.h:84

Member Function Documentation

◆ Visit() [1/2]

template<class T >
void Acore::CreatureRelocationNotifier::Visit ( GridRefMgr< T > &  )
inline
86{}

◆ Visit() [2/2]

void CreatureRelocationNotifier::Visit ( PlayerMapType m)
181{
182 for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
183 {
184 Player* player = iter->GetSource();
185
186 // NOTIFY_VISIBILITY_CHANGED does not guarantee that player will do it himself (because distance is also checked), but screw it, it's not that important
189
190 // NOTIFY_AI_RELOCATION does not guarantee that player will do it himself (because distance is also checked), but screw it, it's not that important
193 }
194}
void CreatureUnitRelocationWorker(Creature *c, Unit *u)
Definition: GridNotifiers.cpp:149
@ NOTIFY_AI_RELOCATION
Definition: Object.h:66
@ NOTIFY_VISIBILITY_CHANGED
Definition: Object.h:67
Definition: LinkedList.h:139
bool IsMoveInLineOfSightStrictlyDisabled()
Definition: Creature.h:278
bool isNeedNotify(uint16 f) const
Definition: Object.h:568
Definition: Player.h:1064
void UpdateVisibilityOf(WorldObject *target)
Definition: PlayerUpdates.cpp:1667
WorldObject * m_seer
Definition: Player.h:2314
iterator begin()
Definition: GridRefMgr.h:35
iterator end()
Definition: GridRefMgr.h:36

References GridRefMgr< OBJECT >::begin(), CreatureUnitRelocationWorker(), GridRefMgr< OBJECT >::end(), i_creature, Creature::IsMoveInLineOfSightStrictlyDisabled(), WorldObject::isNeedNotify(), Player::m_seer, NOTIFY_AI_RELOCATION, NOTIFY_VISIBILITY_CHANGED, and Player::UpdateVisibilityOf().

Member Data Documentation

◆ i_creature

Creature& Acore::CreatureRelocationNotifier::i_creature

Referenced by Visit().