diff options
Diffstat (limited to 'src/game-server/trigger.cpp')
-rw-r--r-- | src/game-server/trigger.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/game-server/trigger.cpp b/src/game-server/trigger.cpp index c0c9bd85..3309c754 100644 --- a/src/game-server/trigger.cpp +++ b/src/game-server/trigger.cpp @@ -28,6 +28,8 @@ #include "game-server/movingobject.hpp" #include "game-server/state.hpp" +#include "utils/logger.h" + void WarpAction::process(Object *obj) { if (obj->getType() == OBJECT_CHARACTER) @@ -36,6 +38,17 @@ void WarpAction::process(Object *obj) } } +void ScriptAction::process(Object *obj) +{ + LOG_DEBUG("Script trigger area activated: "<<mFunction<<"("<<obj<<", "<<mArg<<")"); + if (!mScript) return; + if (mFunction == "") return; + mScript->prepare(mFunction); + mScript->push(obj); + mScript->push(mArg); + mScript->execute(); +} + void TriggerArea::update() { for (MovingObjectIterator i(getMap()->getInsideRectangleIterator(mZone)); i; ++i) |