feat(Core/Instance): Add TaskScheduler to the InstanceScript class (#17284)

feat(Core/Instance): Add TaskScheduler to the instancescript class
This commit is contained in:
Skjalf
2023-09-17 10:56:02 -03:00
committed by GitHub
parent 655f2bb15b
commit 0bf559f975
4 changed files with 14 additions and 18 deletions

View File

@@ -20,6 +20,7 @@
#include "CreatureAI.h"
#include "ObjectMgr.h"
#include "TaskScheduler.h"
#include "World.h"
#include "ZoneScript.h"
#include <set>
@@ -159,7 +160,7 @@ public:
void SaveToDB();
virtual void Update(uint32 /*diff*/) {}
virtual void Update(uint32 /*diff*/);
//Used by the map's CanEnter function.
//This is to prevent players from entering during boss encounters.
@@ -263,6 +264,8 @@ public:
// Allows executing code using all creatures registered in the instance script as minions
void DoForAllMinions(uint32 id, std::function<void(Creature*)> exec);
TaskScheduler scheduler;
protected:
void SetHeaders(std::string const& dataHeaders);
void SetBossNumber(uint32 number) { bosses.resize(number); }