AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
GameEventMgr.h File Reference
#include "Common.h"
#include "ObjectGuid.h"
#include "SharedDefines.h"
#include <map>
#include <unordered_map>

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, GameEventFinishConditionGameEventConditionMap
 

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

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

Macro Definition Documentation

◆ max_ge_check_delay

#define max_ge_check_delay   DAY

◆ sGameEventMgr

#define sGameEventMgr   GameEventMgr::instance()

Typedef Documentation

◆ GameEventConditionMap

Enumeration Type Documentation

◆ GameEventState

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};
@ GAMEEVENT_NORMAL
Definition: GameEventMgr.h:31
@ GAMEEVENT_INTERNAL
Definition: GameEventMgr.h:36
@ GAMEEVENT_WORLD_FINISHED
Definition: GameEventMgr.h:35
@ GAMEEVENT_WORLD_CONDITIONS
Definition: GameEventMgr.h:33
@ GAMEEVENT_WORLD_NEXTPHASE
Definition: GameEventMgr.h:34
@ GAMEEVENT_WORLD_INACTIVE
Definition: GameEventMgr.h:32

Function Documentation

◆ IsEventActive()

bool IsEventActive ( uint16  event_id)
1925{
1926 GameEventMgr::ActiveEvents const& ae = sGameEventMgr->GetActiveEventList();
1927 return ae.find(event_id) != ae.end();
1928}
#define sGameEventMgr
Definition: GameEventMgr.h:186
std::set< uint16 > ActiveEvents
Definition: GameEventMgr.h:106

References sGameEventMgr.

Referenced by Player::_LoadBrewOfTheMonth(), Battleground::EndBattleground(), npc_innkeeper::OnGossipHello(), and npc_innkeeper::OnGossipSelect().

◆ IsHolidayActive()

bool IsHolidayActive ( HolidayIds  id)
1910{
1911 if (id == HOLIDAY_NONE)
1912 return false;
1913
1914 GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
1915 GameEventMgr::ActiveEvents const& ae = sGameEventMgr->GetActiveEventList();
1916
1917 for (GameEventMgr::ActiveEvents::const_iterator itr = ae.begin(); itr != ae.end(); ++itr)
1918 if (events[*itr].holiday_id == id)
1919 return true;
1920
1921 return false;
1922}
events
Definition: boss_sartura.cpp:43
@ HOLIDAY_NONE
Definition: SharedDefines.h:2742
std::vector< GameEventData > GameEventDataMap
Definition: GameEventMgr.h:107

References HOLIDAY_NONE, and sGameEventMgr.

Referenced by Player::CanUseItem(), BattlegroundMgr::IsBGWeekend(), lfg::LFGMgr::IsSeasonActive(), AchievementCriteriaData::Meets(), npc_midsummer_bonfire::npc_midsummer_bonfire(), spell_bonfires_blessing::OnApply(), MidsummerPlayerScript::OnUpdateZone(), BattlegroundAV::SetupBattleground(), go_brewfest_music::go_brewfest_musicAI::UpdateAI(), go_pirate_day_music::go_pirate_day_musicAI::UpdateAI(), go_darkmoon_faire_music::go_darkmoon_faire_musicAI::UpdateAI(), and go_midsummer_music::go_midsummer_musicAI::UpdateAI().