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
76: VisibleNotifier(player, false, largeOnly) { }
VisibleNotifier(Player &player, bool gobjOnly, bool largeOnly)
Definition: GridNotifiers.h:52

Member Function Documentation

◆ Visit() [1/2]

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

References Acore::VisibleNotifier::Visit().

◆ Visit() [2/2]

void PlayerRelocationNotifier::Visit ( PlayerMapType m)
169{
170 for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
171 {
172 Player* player = iter->GetSource();
173 vis_guids.erase(player->GetGUID());
175 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)
176 }
177}
Definition: LinkedList.h:139
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
Definition: Player.h:1081
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:47
UpdateData i_data
Definition: GridNotifiers.h:50
Player & i_player
Definition: GridNotifiers.h:45
GuidUnorderedSet vis_guids
Definition: GridNotifiers.h:46

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.