AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
GameEventMgr.cpp File Reference
#include "GameEventMgr.h"
#include "BattlegroundMgr.h"
#include "Chat.h"
#include "DisableMgr.h"
#include "GameObjectAI.h"
#include "GameTime.h"
#include "Language.h"
#include "Log.h"
#include "MapMgr.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "PoolMgr.h"
#include "ScriptMgr.h"
#include "Transport.h"
#include "UnitAI.h"
#include "World.h"
#include "WorldStatePackets.h"
#include <time.h>

Go to the source code of this file.

Classes

class  GameEventAIHookWorker
 

Functions

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

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().