AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
GameEventAIHookWorker Class Reference

Public Member Functions

 GameEventAIHookWorker (uint16 eventId, bool activate)
 
void Visit (std::unordered_map< ObjectGuid, Creature * > &creatureMap)
 
void Visit (std::unordered_map< ObjectGuid, GameObject * > &gameObjectMap)
 
template<class T >
void Visit (std::unordered_map< ObjectGuid, T * > &)
 

Private Attributes

uint16 _eventId
 
bool _activate
 

Detailed Description

Constructor & Destructor Documentation

◆ GameEventAIHookWorker()

GameEventAIHookWorker::GameEventAIHookWorker ( uint16  eventId,
bool  activate 
)
inline
1878: _eventId(eventId), _activate(activate) { }
bool _activate
Definition GameEventMgr.cpp:1899
uint16 _eventId
Definition GameEventMgr.cpp:1898

Member Function Documentation

◆ Visit() [1/3]

void GameEventAIHookWorker::Visit ( std::unordered_map< ObjectGuid, Creature * > &  creatureMap)
inline
1881 {
1882 for (auto const& p : creatureMap)
1883 if (p.second->IsInWorld() && !p.second->IsDuringRemoveFromWorld() && p.second->FindMap() && p.second->IsAIEnabled && p.second->AI())
1884 p.second->AI()->sOnGameEvent(_activate, _eventId);
1885 }

References _activate, and _eventId.

◆ Visit() [2/3]

void GameEventAIHookWorker::Visit ( std::unordered_map< ObjectGuid, GameObject * > &  gameObjectMap)
inline
1888 {
1889 for (auto const& p : gameObjectMap)
1890 if (p.second->IsInWorld() && p.second->FindMap() && p.second->AI())
1891 p.second->AI()->OnGameEvent(_activate, _eventId);
1892 }

References _activate, and _eventId.

◆ Visit() [3/3]

template<class T >
void GameEventAIHookWorker::Visit ( std::unordered_map< ObjectGuid, T * > &  )
inline
1895{ }

Member Data Documentation

◆ _activate

bool GameEventAIHookWorker::_activate
private

Referenced by Visit(), and Visit().

◆ _eventId

uint16 GameEventAIHookWorker::_eventId
private

Referenced by Visit(), and Visit().


The documentation for this class was generated from the following file: