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, bool largeOnly)
 
template<class T >
void Visit (GridRefMgr< T > &m)
 
void Visit (PlayerMapType &)
 
- Public Member Functions inherited from Acore::VisibleNotifier
 VisibleNotifier (Player &player, bool gobjOnly, bool largeOnly)
 
void Visit (GameObjectMapType &)
 
template<class T >
void Visit (GridRefMgr< T > &m)
 
void SendToSelf (void)
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ PlayerRelocationNotifier()

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

Member Function Documentation

◆ Visit() [1/2]

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

References Acore::VisibleNotifier::Visit().

◆ Visit() [2/2]

void PlayerRelocationNotifier::Visit ( PlayerMapType m)
171{
172 for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
173 {
174 Player* player = iter->GetSource();
175 vis_guids.erase(player->GetGUID());
177 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)
178 }
179}
Definition: LinkedList.h:139
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
Definition: Player.h:1056
void UpdateVisibilityOf(WorldObject *target)
Definition: PlayerUpdates.cpp:1671
iterator begin()
Definition: GridRefMgr.h:35
iterator end()
Definition: GridRefMgr.h:36
std::vector< Unit * > & i_visibleNow
Definition: GridNotifiers.h:45
UpdateData i_data
Definition: GridNotifiers.h:48
Player & i_player
Definition: GridNotifiers.h:43
GuidUnorderedSet vis_guids
Definition: GridNotifiers.h:44

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