mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
Core/Hooks: Adds hooks for start and stop game events (#1472)
This commit is contained in:
committed by
Kargatum
parent
23d78ce6bc
commit
3a39aaeed5
@@ -20,6 +20,7 @@
|
||||
#include "AchievementMgr.h"
|
||||
#include "DynamicObject.h"
|
||||
#include "ArenaTeam.h"
|
||||
#include "GameEventMgr.h"
|
||||
|
||||
class AuctionHouseObject;
|
||||
class AuraScript;
|
||||
@@ -1135,6 +1136,19 @@ class ModuleScript : public ScriptObject
|
||||
ModuleScript(const char* name);
|
||||
};
|
||||
|
||||
class GameEventScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
GameEventScript(const char* name);
|
||||
|
||||
public:
|
||||
// Runs on start event
|
||||
virtual void OnStart(uint16 /*EventID*/) { }
|
||||
|
||||
// Runs on stop event
|
||||
virtual void OnStop(uint16 /*EventID*/) { }
|
||||
};
|
||||
|
||||
// Placed here due to ScriptRegistry::AddScript dependency.
|
||||
#define sScriptMgr ACE_Singleton<ScriptMgr, ACE_Null_Mutex>::instance()
|
||||
|
||||
@@ -1469,7 +1483,12 @@ class ScriptMgr
|
||||
|
||||
public: /* SpellSC */
|
||||
|
||||
void OnCalcMaxDuration(Aura const* aura, int32& maxDuration);
|
||||
void OnCalcMaxDuration(Aura const* aura, int32& maxDuration);
|
||||
|
||||
public: /* GameEventScript */
|
||||
|
||||
void OnGameEventStart(uint16 EventID);
|
||||
void OnGameEventStop(uint16 EventID);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user