TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
 

Constructor & Destructor Documentation

GameEventAIHookWorker::GameEventAIHookWorker ( uint16  eventId,
bool  activate 
)
inline
1625 : _eventId(eventId), _activate(activate) { }
bool _activate
Definition: GameEventMgr.cpp:1646
uint16 _eventId
Definition: GameEventMgr.cpp:1645

Member Function Documentation

void GameEventAIHookWorker::Visit ( std::unordered_map< ObjectGuid, Creature * > &  creatureMap)
inline
1628  {
1629  for (auto const& p : creatureMap)
1630  if (p.second->IsInWorld() && p.second->IsAIEnabled)
1631  p.second->AI()->sOnGameEvent(_activate, _eventId);
1632  }
bool _activate
Definition: GameEventMgr.cpp:1646
uint16 _eventId
Definition: GameEventMgr.cpp:1645
void GameEventAIHookWorker::Visit ( std::unordered_map< ObjectGuid, GameObject * > &  gameObjectMap)
inline
1635  {
1636  for (auto const& p : gameObjectMap)
1637  if (p.second->IsInWorld())
1638  p.second->AI()->OnGameEvent(_activate, _eventId);
1639  }
bool _activate
Definition: GameEventMgr.cpp:1646
uint16 _eventId
Definition: GameEventMgr.cpp:1645
template<class T >
void GameEventAIHookWorker::Visit ( std::unordered_map< ObjectGuid, T * > &  )
inline
1642 { }

Member Data Documentation

bool GameEventAIHookWorker::_activate
private
uint16 GameEventAIHookWorker::_eventId
private

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