diff options
author | Philipp Sehmisch <mana@crushnet.org> | 2010-03-22 21:55:34 +0100 |
---|---|---|
committer | Philipp Sehmisch <mana@crushnet.org> | 2010-04-11 18:27:20 +0200 |
commit | f3ad48f5ce2b3b584870674e58a7265779b3836b (patch) | |
tree | 73323079c2accbdf20f4617be21506c556e66329 /src/game-server/main-game.cpp | |
parent | e0669e4025e3772590cbde835d79fb06efea04fa (diff) | |
download | manaserv-f3ad48f5ce2b3b584870674e58a7265779b3836b.tar.gz manaserv-f3ad48f5ce2b3b584870674e58a7265779b3836b.tar.xz manaserv-f3ad48f5ce2b3b584870674e58a7265779b3836b.zip |
Added global lua event script (only on_being_death_accept for now)
Reviewed-by: Jared Adams <Jaxad0127@gmail.com>
Diffstat (limited to 'src/game-server/main-game.cpp')
-rw-r--r-- | src/game-server/main-game.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game-server/main-game.cpp b/src/game-server/main-game.cpp index cb6ea41..3ad265f 100644 --- a/src/game-server/main-game.cpp +++ b/src/game-server/main-game.cpp @@ -50,6 +50,7 @@ #include "net/bandwidth.hpp" #include "net/connectionhandler.hpp" #include "net/messageout.hpp" +#include "scripting/luascript.hpp" #include "utils/logger.h" #include "utils/processorutils.hpp" #include "utils/stringfilter.h" @@ -172,6 +173,12 @@ void initialize() MonsterManager::initialize(DEFAULT_MONSTERSDB_FILE); StatusManager::initialize(DEFAULT_STATUSDB_FILE); PermissionManager::initialize(DEFAULT_PERMISSION_FILE); + // Initialize global event script + Script::global_event_script = new LuaScript(); + if (!Script::global_event_script->loadFile("scripts/global_events.lua")) + { + Script::global_event_script = NULL; + } // --- Initialize the global handlers // FIXME: Make the global handlers global vars or part of a bigger |