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 eventId)
 

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  eventId)
1965{
1966 GameEventMgr::ActiveEvents const& ae = sGameEventMgr->GetActiveEventList();
1967 return ae.find(eventId) != ae.end();
1968}
#define sGameEventMgr
Definition GameEventMgr.h:201
std::set< uint16 > ActiveEvents
Definition GameEventMgr.h:106

References sGameEventMgr.

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

◆ IsHolidayActive()

bool IsHolidayActive ( HolidayIds  id)
1950{
1951 if (id == HOLIDAY_NONE)
1952 return false;
1953
1954 GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
1955 GameEventMgr::ActiveEvents const& ae = sGameEventMgr->GetActiveEventList();
1956
1957 for (GameEventMgr::ActiveEvents::const_iterator itr = ae.begin(); itr != ae.end(); ++itr)
1958 if (events[*itr].HolidayId == id)
1959 return true;
1960
1961 return false;
1962}
@ HOLIDAY_NONE
Definition SharedDefines.h:2742
events
Definition boss_sartura.cpp:43
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::OnPlayerUpdateZone(), 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().