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

#include "GridNotifiers.h"

Inheritance diagram for Acore::PlayerRelocationNotifier:

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
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 
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)
void Visit(GameObjectMapType &)
Definition: GridNotifiers.cpp:30

References Acore::VisibleNotifier::Visit().

◆ Visit() [2/2]

void PlayerRelocationNotifier::Visit ( PlayerMapType m)
173 for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
174 {
175 Player* player = iter->GetSource();
176 vis_guids.erase(player->GetGUID());
178 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)
179 }
Definition: LinkedList.h:139
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
Definition: Player.h:1046
void UpdateVisibilityOf(WorldObject *target)
Definition: PlayerUpdates.cpp:1668
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.