feat(Core/Disables): Implement DISABLE_TYPE_GAME_EVENT (#9099)

This commit is contained in:
Skjalf
2021-11-10 15:06:46 -03:00
committed by GitHub
parent c519dc5738
commit 855f098a57
5 changed files with 60 additions and 1 deletions

View File

@@ -55,6 +55,7 @@ typedef std::map<uint32 /*condition id*/, GameEventFinishCondition> GameEventCon
struct GameEventData
{
GameEventData() { }
uint32 eventId;
time_t start{1}; // occurs after this time
time_t end{0}; // occurs before this time
time_t nextstart{0}; // after this time the follow-up events count this phase completed
@@ -119,6 +120,7 @@ public:
void StopEvent(uint16 event_id, bool overwrite = false);
void HandleQuestComplete(uint32 quest_id); // called on world event type quest completions
uint32 GetNPCFlag(Creature* cr);
[[nodiscard]] uint32 GetHolidayEventId(uint32 holidayId) const;
private:
void SendWorldStateUpdate(Player* player, uint16 event_id);
void AddActiveEvent(uint16 event_id) { m_ActiveEvents.insert(event_id); }