From 4559ca444daacfd02ebb05f1657148a2b4cf3d8b Mon Sep 17 00:00:00 2001 From: Erik Schilling Date: Wed, 20 Feb 2013 22:46:55 +0100 Subject: Introduced Script::Context This should allow to finally call functions to lua without having to care about working around situations where a lua call causes a c++ call which needs to call to lua again. Tested against the source of tales repository data. --- src/game-server/statuseffect.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/game-server/statuseffect.cpp') diff --git a/src/game-server/statuseffect.cpp b/src/game-server/statuseffect.cpp index c101bc02..b5b988f4 100644 --- a/src/game-server/statuseffect.cpp +++ b/src/game-server/statuseffect.cpp @@ -37,10 +37,9 @@ void StatusEffect::tick(Being *target, int count) if (mTickCallback.isValid()) { Script *s = ScriptManager::currentState(); - s->setMap(target->getMap()); s->prepare(mTickCallback); s->push(target); s->push(count); - s->execute(); + s->execute(target->getMap()); } } -- cgit v1.2.3-70-g09d2