diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-02-21 07:29:58 +0100 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-02-21 07:29:58 +0100 |
commit | f93b4c25242370982715e1a83c11e667b17f20af (patch) | |
tree | 07b392040bd858e205d12cf8f0977cf82fcc2c90 /src/scripting/lua.cpp | |
parent | bcb3f283bda155bec33c83c4627f59acb4616dd8 (diff) | |
parent | 4559ca444daacfd02ebb05f1657148a2b4cf3d8b (diff) | |
download | manaserv-f93b4c25242370982715e1a83c11e667b17f20af.tar.gz manaserv-f93b4c25242370982715e1a83c11e667b17f20af.tar.bz2 manaserv-f93b4c25242370982715e1a83c11e667b17f20af.tar.xz manaserv-f93b4c25242370982715e1a83c11e667b17f20af.zip |
Merge branch 'master' into lpc2012
Diffstat (limited to 'src/scripting/lua.cpp')
-rw-r--r-- | src/scripting/lua.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index 4e2cd283..e305fcd7 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -1438,17 +1438,11 @@ static int chr_request_quest(lua_State *s) Script::Ref callback; script->assignCallback(callback); - // Backup the map since execute will reset it - MapComposite *map = script->getMap(); - script->prepare(callback); script->push(ch); script->push(name); script->push(value); - script->execute(); - - // Restore map - script->setMap(map); + script->execute(ch->getMap()); return 0; } @@ -2132,7 +2126,7 @@ static int get_map_id(lua_State *s) { Script *script = getScript(s); - if (MapComposite *mapComposite = script->getMap()) + if (MapComposite *mapComposite = script->getContext()->map) lua_pushinteger(s, mapComposite->getID()); else lua_pushnil(s); |