18#ifndef TRINITY_GAMEEVENT_MGR_H
19#define TRINITY_GAMEEVENT_MGR_H
28#include <unordered_map>
31#define max_ge_check_delay DAY
106 bool CheckOneGameEvent(
uint16 entry)
const;
113 void StartArenaSeason();
114 void StartInternalEvent(
uint16 event_id);
115 bool StartEvent(
uint16 event_id,
bool overwrite =
false);
116 void StopEvent(
uint16 event_id,
bool overwrite =
false);
117 void HandleQuestComplete(
uint32 quest_id);
121 void SendWorldStateUpdate(
Player* player,
uint16 event_id);
124 void ApplyNewEvent(
uint16 event_id);
125 void UnApplyEvent(
uint16 event_id);
126 void GameEventSpawn(
int16 event_id);
127 void GameEventUnspawn(
int16 event_id);
128 void ChangeEquipOrModel(
int16 event_id,
bool activate);
129 void UpdateEventQuests(
uint16 event_id,
bool activate);
130 void UpdateWorldStates(
uint16 event_id,
bool Activate);
131 void UpdateEventNPCFlags(
uint16 event_id);
132 void UpdateEventNPCVendor(
uint16 event_id,
bool activate);
133 void RunSmartAIScripts(
uint16 event_id,
bool activate);
134 bool CheckOneGameEventConditions(
uint16 event_id);
135 void SaveWorldEventStateToDB(
uint16 event_id);
136 bool hasCreatureQuestActiveEventExcept(
uint32 quest_id,
uint16 event_id);
137 bool hasGameObjectQuestActiveEventExcept(
uint32 quest_id,
uint16 event_id);
141 time_t GetLastStartTime(
uint16 event_id)
const;
153 typedef std::unordered_map<uint32, std::vector<VendorItem>>
NPCVendorMap;
177#define sGameEventMgr GameEventMgr::instance()
TC_GAME_API bool IsHolidayActive(HolidayIds id)
TC_GAME_API bool IsEventActive(uint16 eventId)
std::map< uint32, GameEventFinishCondition > GameEventConditionMap
@ GAMEEVENT_WORLD_FINISHED
@ GAMEEVENT_WORLD_CONDITIONS
@ GAMEEVENT_WORLD_NEXTPHASE
@ GAMEEVENT_WORLD_INACTIVE
GameEventDataMap const & GetEventMap() const
ActiveEvents m_ActiveEvents
GameEventDataMap mGameEvent
GameEventNPCFlagMap mGameEventNPCFlags
bool IsActiveEvent(uint16 event_id)
GameEventIdMap mGameEventPoolIds
std::vector< GameEventData > GameEventDataMap
GameEventGuidMap mGameEventCreatureGuids
void RemoveActiveEvent(uint16 event_id)
void AddActiveEvent(uint16 event_id)
std::vector< GuidList > GameEventGuidMap
std::list< ObjectGuid::LowType > GuidList
std::pair< ObjectGuid::LowType, uint64 > GuidNPCFlagPair
GameEventModelEquipMap mGameEventModelEquip
ActiveEvents const & GetActiveEventList() const
std::list< ModelEquipPair > ModelEquipList
GameEventNPCVendorMap mGameEventVendors
GameEventQuestMap mGameEventCreatureQuests
GameEventGuidMap mGameEventGameobjectGuids
std::set< uint16 > ActiveEvents
std::pair< ObjectGuid::LowType, ModelEquip > ModelEquipPair
QuestIdToEventConditionMap mQuestToEventConditions
std::map< uint32, GameEventQuestToEventConditionNum > QuestIdToEventConditionMap
std::vector< NPCVendorMap > GameEventNPCVendorMap
std::list< GuidNPCFlagPair > NPCFlagList
std::list< uint32 > IdList
GameEventQuestMap mGameEventGameObjectQuests
std::vector< QuestRelList > GameEventQuestMap
std::vector< ModelEquipList > GameEventModelEquipMap
std::list< QuestRelation > QuestRelList
std::vector< IdList > GameEventIdMap
std::unordered_map< uint32, std::vector< VendorItem > > NPCVendorMap
std::pair< uint32, uint32 > QuestRelation
std::vector< NPCFlagList > GameEventNPCFlagMap
void Update(VignetteData &vignette, WorldObject const *owner)
std::set< uint16 > prerequisite_events
GameEventConditionMap conditions