summaryrefslogtreecommitdiffstats
path: root/src/scripting/luascript.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-01-31 21:49:58 +0100
committerPhilipp Sehmisch <crush@themanaworld.org>2009-01-31 22:01:39 +0100
commit393d066045fda5beee4748dc66754d70b4c82d36 (patch)
tree2ed309a5dba7595bc976762f9f625edebfcc4680 /src/scripting/luascript.cpp
parentc423c02890cfb4520da0ac75e00d1bd9f1663ce0 (diff)
downloadmanaserv-393d066045fda5beee4748dc66754d70b4c82d36.tar.gz
manaserv-393d066045fda5beee4748dc66754d70b4c82d36.tar.xz
manaserv-393d066045fda5beee4748dc66754d70b4c82d36.zip
Added on_remove callback to lua API
Diffstat (limited to 'src/scripting/luascript.cpp')
-rw-r--r--src/scripting/luascript.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/scripting/luascript.cpp b/src/scripting/luascript.cpp
index d208395..c88b95f 100644
--- a/src/scripting/luascript.cpp
+++ b/src/scripting/luascript.cpp
@@ -112,8 +112,17 @@ void LuaScript::processDeathEvent(Being *being)
//TODO: get and push a list of creatures who contributed to killing the
// being. This might be very interesting for scripting quests.
execute();
+}
+
+void LuaScript::processRemoveEvent(Thing *being)
+{
+ prepare("remove_notification");
+ push(being);
+ //TODO: get and push a list of creatures who contributed to killing the
+ // being. This might be very interesting for scripting quests.
+ execute();
- being->removeListener(getScriptDeathListener());
+ being->removeListener(getScriptListener());
}
/**