diff options
author | XTZGZoReX <none@none> | 2010-08-07 14:30:10 +0200 |
---|---|---|
committer | XTZGZoReX <none@none> | 2010-08-07 14:30:10 +0200 |
commit | f1c571a79e9ea47025875732580571137baaa1ac (patch) | |
tree | 26a001e598587cdf794d74ef2eb07d2fa0204a1b /src/server/game/Scripting/ScriptMgr.h | |
parent | 360e028331744e1e269db3f8a2d1fec34da9229a (diff) |
* Added new World::OnStartup/OnShutdown hooks.
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.h')
-rw-r--r-- | src/server/game/Scripting/ScriptMgr.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 971924b6b58..e735c7b9765 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -292,6 +292,12 @@ class WorldScript : public ScriptObject, public UpdatableScript<void> // Called on every world tick (don't execute too heavy code here). virtual void OnUpdate(void* null, uint32 diff) { } + + // Called when the world is started. + virtual void OnStartup() { } + + // Called when the world is actually shut down. + virtual void OnShutdown() { } }; class FormulaScript : public ScriptObject @@ -787,6 +793,8 @@ class ScriptMgr void OnShutdownInitiate(ShutdownExitCode code, ShutdownMask mask); void OnShutdownCancel(); void OnWorldUpdate(uint32 diff); + void OnStartup(); + void OnShutdown(); public: /* FormulaScript */ |