19 #ifndef TRINITY_GAMEEVENT_MGR_H
20 #define TRINITY_GAMEEVENT_MGR_H
27 #define max_ge_check_delay DAY // 1 day in seconds
109 GameEventDataMap
const&
GetEventMap()
const {
return mGameEvent; }
110 bool CheckOneGameEvent(
uint16 entry)
const;
117 void StartArenaSeason();
118 void StartInternalEvent(
uint16 event_id);
119 bool StartEvent(
uint16 event_id,
bool overwrite =
false);
120 void StopEvent(
uint16 event_id,
bool overwrite =
false);
121 void HandleQuestComplete(
uint32 quest_id);
125 uint16 GetEventIdForQuest(
Quest const* quest)
const;
127 void SendWorldStateUpdate(
Player* player,
uint16 event_id);
130 void ApplyNewEvent(
uint16 event_id);
131 void UnApplyEvent(
uint16 event_id);
132 void GameEventSpawn(
int16 event_id);
133 void GameEventUnspawn(
int16 event_id);
134 void ChangeEquipOrModel(
int16 event_id,
bool activate);
135 void UpdateEventQuests(
uint16 event_id,
bool activate);
136 void UpdateWorldStates(
uint16 event_id,
bool Activate);
137 void UpdateEventNPCFlags(
uint16 event_id);
138 void UpdateEventNPCVendor(
uint16 event_id,
bool activate);
139 void UpdateBattlegroundSettings();
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);
184 #define sGameEventMgr GameEventMgr::instance()
ActiveEvents const & GetActiveEventList() const
Definition: GameEventMgr.h:108
GameEventIdMap mGameEventPoolIds
Definition: GameEventMgr.h:171
Definition: GameEventMgr.h:36
GameEventDataMap mGameEvent
Definition: GameEventMgr.h:172
uint32 item
Definition: GameEventMgr.h:86
Definition: GameEventMgr.h:39
HolidayIds holiday_id
Definition: GameEventMgr.h:65
bool IsActiveEvent(uint16 event_id)
Definition: GameEventMgr.h:114
Definition: QuestDef.h:279
Definition: SharedDefines.h:3716
float reqNum
Definition: GameEventMgr.h:41
GameEventGuidMap mGameEventCreatureGuids
Definition: GameEventMgr.h:180
GameEventNPCFlagMap mGameEventNPCFlags
Definition: GameEventMgr.h:175
uint8 Type
Definition: GameEventMgr.h:90
void LoadFromDB()
Definition: AddonMgr.cpp:40
std::vector< uint32 > GameEventBitmask
Definition: GameEventMgr.h:164
Definition: GameEventMgr.h:47
GameEventNPCVendorMap mGameEventVendors
Definition: GameEventMgr.h:167
uint8 announce
Definition: GameEventMgr.h:70
GameEventGuidMap mGameEventGameobjectGuids
Definition: GameEventMgr.h:181
std::vector< GuidList > GameEventGuidMap
Definition: GameEventMgr.h:150
GameEventData()
Definition: GameEventMgr.h:58
std::vector< ModelEquipList > GameEventModelEquipMap
Definition: GameEventMgr.h:154
GameEventState
Definition: GameEventMgr.h:29
uint32 entry
Definition: GameEventMgr.h:85
GameEventDataMap const & GetEventMap() const
Definition: GameEventMgr.h:109
std::unordered_map< uint32, uint16 > _questToEventLinks
Definition: GameEventMgr.h:177
GameEventConditionMap conditions
Definition: GameEventMgr.h:67
Definition: Creature.h:467
uint8 equipment_id
Definition: GameEventMgr.h:79
uint32 ExtendedCost
Definition: GameEventMgr.h:89
Definition: GameEventMgr.h:33
time_t end
Definition: GameEventMgr.h:61
uint64 LowType
Definition: ObjectGuid.h:199
uint32 length
Definition: GameEventMgr.h:64
std::list< uint32 > IdList
Definition: GameEventMgr.h:149
ActiveEvents m_ActiveEvents
Definition: GameEventMgr.h:176
uint32 done_world_state
Definition: GameEventMgr.h:44
std::list< QuestRelation > QuestRelList
Definition: GameEventMgr.h:156
Definition: GameEventMgr.h:97
std::list< ObjectGuid::LowType > GuidList
Definition: GameEventMgr.h:148
std::list< NPCVendorEntry > NPCVendorList
Definition: GameEventMgr.h:158
Definition: GameEventMgr.h:35
uint32 modelid_prev
Definition: GameEventMgr.h:78
uint32 incrtime
Definition: GameEventMgr.h:88
QuestIdToEventConditionMap mQuestToEventConditions
Definition: GameEventMgr.h:174
std::vector< NPCFlagList > GameEventNPCFlagMap
Definition: GameEventMgr.h:163
TC_GAME_API bool IsHolidayActive(HolidayIds id)
Definition: GameEventMgr.cpp:1673
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
static void Initialize(PCASC_SALSA20 pState, LPBYTE pbKey, DWORD cbKeyLength, LPBYTE pbVector)
Definition: CascDecrypt.cpp:81
uint64_t uint64
Definition: Define.h:149
uint16_t uint16
Definition: Define.h:151
float num
Definition: GameEventMgr.h:51
std::pair< ObjectGuid::LowType, uint64 > GuidNPCFlagPair
Definition: GameEventMgr.h:161
time_t nextstart
Definition: GameEventMgr.h:62
uint32 max_world_state
Definition: GameEventMgr.h:43
std::set< uint16 > prerequisite_events
Definition: GameEventMgr.h:68
Definition: GameEventMgr.h:31
bool isSystemInit
Definition: GameEventMgr.h:178
uint8 equipement_id_prev
Definition: GameEventMgr.h:80
void AddActiveEvent(uint16 event_id)
Definition: GameEventMgr.h:128
GameEventState state
Definition: GameEventMgr.h:66
int32 maxcount
Definition: GameEventMgr.h:87
std::vector< QuestRelList > GameEventQuestMap
Definition: GameEventMgr.h:157
uint32 occurence
Definition: GameEventMgr.h:63
Definition: GameEventMgr.h:75
Definition: GameEventMgr.h:83
GameEventBitmask mGameEventBattlegroundHolidays
Definition: GameEventMgr.h:173
Definition: GameEventMgr.h:34
std::vector< NPCVendorList > GameEventNPCVendorMap
Definition: GameEventMgr.h:159
std::set< uint16 > ActiveEvents
Definition: GameEventMgr.h:106
std::map< uint32, GameEventQuestToEventConditionNum > QuestIdToEventConditionMap
Definition: GameEventMgr.h:160
std::pair< ObjectGuid::LowType, ModelEquip > ModelEquipPair
Definition: GameEventMgr.h:152
std::list< ModelEquipPair > ModelEquipList
Definition: GameEventMgr.h:153
uint32 modelid
Definition: GameEventMgr.h:77
#define TC_GAME_API
Definition: Define.h:134
GameEventQuestMap mGameEventGameObjectQuests
Definition: GameEventMgr.h:166
std::vector< GameEventData > GameEventDataMap
Definition: GameEventMgr.h:107
Definition: GameEventMgr.h:32
uint8_t uint8
Definition: Define.h:152
~GameEventMgr()
Definition: GameEventMgr.h:101
GameEventQuestMap mGameEventCreatureQuests
Definition: GameEventMgr.h:165
int16_t int16
Definition: Define.h:147
std::list< GuidNPCFlagPair > NPCFlagList
Definition: GameEventMgr.h:162
std::pair< uint32, uint32 > QuestRelation
Definition: GameEventMgr.h:155
TC_GAME_API bool IsEventActive(uint16 event_id)
Definition: GameEventMgr.cpp:1688
std::vector< IdList > GameEventIdMap
Definition: GameEventMgr.h:151
uint32 condition
Definition: GameEventMgr.h:50
Definition: GameEventMgr.h:56
std::string description
Definition: GameEventMgr.h:69
float done
Definition: GameEventMgr.h:42
uint16 event_id
Definition: GameEventMgr.h:49
bool isValid() const
Definition: GameEventMgr.h:72
HolidayIds
Definition: SharedDefines.h:3714
std::map< uint32, GameEventFinishCondition > GameEventConditionMap
Definition: GameEventMgr.h:54
GameEventModelEquipMap mGameEventModelEquip
Definition: GameEventMgr.h:168
void Update(uint32 diff)
Definition: WeatherMgr.cpp:150
void RemoveActiveEvent(uint16 event_id)
Definition: GameEventMgr.h:129
time_t start
Definition: GameEventMgr.h:60