TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GameEventMgr.h File Reference
#include "Common.h"
#include "SharedDefines.h"
#include "Define.h"
#include "ObjectGuid.h"
+ Include dependency graph for GameEventMgr.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GameEventFinishCondition
 
struct  GameEventQuestToEventConditionNum
 
struct  GameEventData
 
struct  ModelEquip
 
struct  NPCVendorEntry
 
class  GameEventMgr
 

Macros

#define max_ge_check_delay   DAY
 
#define sGameEventMgr   GameEventMgr::instance()
 

Typedefs

typedef std::map< uint32,
GameEventFinishCondition
GameEventConditionMap
 

Enumerations

enum  GameEventState {
  GAMEEVENT_NORMAL = 0, GAMEEVENT_WORLD_INACTIVE = 1, GAMEEVENT_WORLD_CONDITIONS = 2, GAMEEVENT_WORLD_NEXTPHASE = 3,
  GAMEEVENT_WORLD_FINISHED = 4, GAMEEVENT_INTERNAL = 5
}
 

Functions

TC_GAME_API bool IsHolidayActive (HolidayIds id)
 
TC_GAME_API bool IsEventActive (uint16 event_id)
 

Macro Definition Documentation

#define max_ge_check_delay   DAY
#define sGameEventMgr   GameEventMgr::instance()

Typedef Documentation

Enumeration Type Documentation

Enumerator
GAMEEVENT_NORMAL 
GAMEEVENT_WORLD_INACTIVE 
GAMEEVENT_WORLD_CONDITIONS 
GAMEEVENT_WORLD_NEXTPHASE 
GAMEEVENT_WORLD_FINISHED 
GAMEEVENT_INTERNAL 
30 {
31  GAMEEVENT_NORMAL = 0, // standard game events
32  GAMEEVENT_WORLD_INACTIVE = 1, // not yet started
33  GAMEEVENT_WORLD_CONDITIONS = 2, // condition matching phase
34  GAMEEVENT_WORLD_NEXTPHASE = 3, // conditions are met, now 'length' timer to start next event
35  GAMEEVENT_WORLD_FINISHED = 4, // next events are started, unapply this one
36  GAMEEVENT_INTERNAL = 5 // never handled in update
37 };
Definition: GameEventMgr.h:36
Definition: GameEventMgr.h:33
Definition: GameEventMgr.h:35
Definition: GameEventMgr.h:31
Definition: GameEventMgr.h:34
Definition: GameEventMgr.h:32

Function Documentation

TC_GAME_API bool IsEventActive ( uint16  event_id)
1689 {
1690  GameEventMgr::ActiveEvents const& ae = sGameEventMgr->GetActiveEventList();
1691  return ae.find(event_id) != ae.end();
1692 }
#define sGameEventMgr
Definition: GameEventMgr.h:184
std::set< uint16 > ActiveEvents
Definition: GameEventMgr.h:106

+ Here is the caller graph for this function:

TC_GAME_API bool IsHolidayActive ( HolidayIds  id)
1674 {
1675  if (id == HOLIDAY_NONE)
1676  return false;
1677 
1678  GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
1679  GameEventMgr::ActiveEvents const& ae = sGameEventMgr->GetActiveEventList();
1680 
1681  for (GameEventMgr::ActiveEvents::const_iterator itr = ae.begin(); itr != ae.end(); ++itr)
1682  if (events[*itr].holiday_id == id)
1683  return true;
1684 
1685  return false;
1686 }
Definition: SharedDefines.h:3716
#define sGameEventMgr
Definition: GameEventMgr.h:184
std::set< uint16 > ActiveEvents
Definition: GameEventMgr.h:106
std::vector< GameEventData > GameEventDataMap
Definition: GameEventMgr.h:107

+ Here is the caller graph for this function: