18#ifndef TRINITY_GAMEEVENT_MGR_H
19#define TRINITY_GAMEEVENT_MGR_H
29#include <unordered_map>
32#define max_ge_check_delay DAY
113 bool CheckOneGameEvent(
uint16 entry)
const;
120 void StartArenaSeason();
121 void StartInternalEvent(
uint16 event_id);
122 bool StartEvent(
uint16 event_id,
bool overwrite =
false);
123 void StopEvent(
uint16 event_id,
bool overwrite =
false);
124 void HandleQuestComplete(
uint32 quest_id);
128 void SendWorldStateUpdate(
Player* player,
uint16 event_id);
129 void AddActiveEvent(
uint16 event_id);
130 void RemoveActiveEvent(
uint16 event_id);
131 void ApplyNewEvent(
uint16 event_id);
132 void UnApplyEvent(
uint16 event_id);
133 void GameEventSpawn(
int16 event_id);
134 void GameEventUnspawn(
int16 event_id);
135 void ChangeEquipOrModel(
int16 event_id,
bool activate);
136 void UpdateEventQuests(
uint16 event_id,
bool activate);
137 void UpdateWorldStates(
uint16 event_id,
bool Activate);
138 void UpdateEventNPCFlags(
uint16 event_id);
139 void UpdateEventNPCVendor(
uint16 event_id,
bool activate);
140 void RunSmartAIScripts(
uint16 event_id,
bool activate);
141 bool CheckOneGameEventConditions(
uint16 event_id);
142 void SaveWorldEventStateToDB(
uint16 event_id);
143 bool hasCreatureQuestActiveEventExcept(
uint32 quest_id,
uint16 event_id);
144 bool hasGameObjectQuestActiveEventExcept(
uint32 quest_id,
uint16 event_id);
148 time_t GetLastStartTime(
uint16 event_id)
const;
160 typedef std::unordered_map<uint32, std::vector<VendorItem>>
NPCVendorMap;
184#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
std::optional< T > Optional
Optional helper class to wrap optional values within.
GameEventDataMap const & GetEventMap() const
ActiveEvents m_ActiveEvents
bool IsActiveEvent(uint16 event_id) const
GameEventDataMap mGameEvent
GameEventNPCFlagMap mGameEventNPCFlags
GameEventIdMap mGameEventPoolIds
std::vector< GameEventData > GameEventDataMap
GameEventGuidMap mGameEventCreatureGuids
GameEventMgr(GameEventMgr const &)=delete
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
GameEventMgr & operator=(GameEventMgr &&)=delete
std::set< uint16 > ActiveEvents
std::pair< ObjectGuid::LowType, ModelEquip > ModelEquipPair
QuestIdToEventConditionMap mQuestToEventConditions
std::map< uint32, GameEventQuestToEventConditionNum > QuestIdToEventConditionMap
std::vector< NPCVendorMap > GameEventNPCVendorMap
GameEventMgr & operator=(GameEventMgr const &)=delete
GameEventMgr(GameEventMgr &&)=delete
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
std::set< uint16 > prerequisite_events
GameEventConditionMap conditions
Optional< int32 > WorldStateId