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

#include "GridNotifiers.h"

Inheritance diagram for Acore::PlayerRelocationNotifier:
Acore::VisibleNotifier

Public Member Functions

 PlayerRelocationNotifier (Player &player)
 
template<class T >
void Visit (std::vector< T > &m)
 
template<class T >
void Visit (GridRefMgr< T > &m)
 
void Visit (PlayerMapType &)
 
- Public Member Functions inherited from Acore::VisibleNotifier
 VisibleNotifier (Player &player, bool gobjOnly)
 
void Visit (GameObjectMapType &)
 
template<class T >
void Visit (std::vector< T > &m)
 
template<class T >
void Visit (GridRefMgr< T > &m)
 
void SendToSelf (void)
 

Additional Inherited Members

- Public Attributes inherited from Acore::VisibleNotifier
Playeri_player
 
std::vector< Unit * > & i_visibleNow
 
bool i_gobjOnly
 
UpdateData i_data
 

Detailed Description

Constructor & Destructor Documentation

◆ PlayerRelocationNotifier()

Acore::PlayerRelocationNotifier::PlayerRelocationNotifier ( Player player)
inline
75: VisibleNotifier(player, false) { }
VisibleNotifier(Player &player, bool gobjOnly)
Definition GridNotifiers.h:50

Member Function Documentation

◆ Visit() [1/3]

template<class T >
void Acore::PlayerRelocationNotifier::Visit ( GridRefMgr< T > &  m)
inline
void Visit(GameObjectMapType &)
Definition GridNotifiers.cpp:27

References Acore::VisibleNotifier::Visit().

◆ Visit() [2/3]

void PlayerRelocationNotifier::Visit ( PlayerMapType m)
148{
149 for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
150 {
151 Player* player = iter->GetSource();
153 player->UpdateVisibilityOf(&i_player); // this notifier with different Visit(PlayerMapType&) than VisibleNotifier is needed to update visibility of self for other players when we move (eg. stealth detection changes)
154 }
155}
iterator begin()
Definition GridRefMgr.h:35
iterator end()
Definition GridRefMgr.h:36
Definition LinkedList.h:139
Definition Player.h:1072
void UpdateVisibilityOf(WorldObject *target)
Definition PlayerUpdates.cpp:1707
std::vector< Unit * > & i_visibleNow
Definition GridNotifiers.h:46
UpdateData i_data
Definition GridNotifiers.h:48
Player & i_player
Definition GridNotifiers.h:45

References GridRefMgr< OBJECT >::begin(), GridRefMgr< OBJECT >::end(), Acore::VisibleNotifier::i_data, Acore::VisibleNotifier::i_player, Acore::VisibleNotifier::i_visibleNow, and Player::UpdateVisibilityOf().

◆ Visit() [3/3]

template<class T >
void Acore::PlayerRelocationNotifier::Visit ( std::vector< T > &  m)
inline

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