summaryrefslogtreecommitdiff
path: root/src/server/game/Scripting/ScriptMgr.h
diff options
context:
space:
mode:
author55Honey <71938210+55Honey@users.noreply.github.com>2023-02-07 17:15:17 +0100
committerGitHub <noreply@github.com>2023-02-07 13:15:17 -0300
commita1fb48391b2decd9d24bf05dcb29cc42cbead28a (patch)
treed45fa00551758345c1a85b9d1fdb3d48574a5658 /src/server/game/Scripting/ScriptMgr.h
parente7e119283f776746f34f409480c567e87f078483 (diff)
feat(Core/Scripting): Implement OnBeforeSetBossState (#14891)
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.h')
-rw-r--r--src/server/game/Scripting/ScriptMgr.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index 450ecc6309..a94922d7d1 100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -27,6 +27,7 @@
#include "DynamicObject.h"
#include "GameEventMgr.h"
#include "Group.h"
+#include "InstanceScript.h"
#include "LFGMgr.h"
#include "ObjectMgr.h"
#include "PetDefines.h"
@@ -1597,6 +1598,9 @@ public:
// Called when instance id is removed from database (e.g. instance reset)
virtual void OnInstanceIdRemoved(uint32 /*instanceId*/) { }
+
+ // Called when any raid boss has their state updated (e.g. pull, reset, kill)
+ virtual void OnBeforeSetBossState(uint32 /*id*/, EncounterState /*newState*/, EncounterState /*oldState*/, Map* /*instance*/) { }
};
class BGScript : public ScriptObject
@@ -2431,6 +2435,7 @@ public: /* GlobalScript */
void OnLoadSpellCustomAttr(SpellInfo* spell);
bool OnAllowedForPlayerLootCheck(Player const* player, ObjectGuid source);
void OnInstanceIdRemoved(uint32 instanceId);
+ void OnBeforeSetBossState(uint32 id, EncounterState newState, EncounterState oldState, Map* instance);
public: /* Scheduled scripts */
uint32 IncreaseScheduledScriptsCount() { return ++_scheduledScripts; }