diff options
author | Kpy! <ouroboros.ai@gmail.com> | 2015-04-21 13:48:25 +0200 |
---|---|---|
committer | Kpy! <ouroboros.ai@gmail.com> | 2015-04-21 21:24:47 +0200 |
commit | 79aa56c704ff4117511cd33be3efd0321683d89a (patch) | |
tree | e8f26bd445a9985e47486281f203b0eeb67bb23b /src/map | |
parent | 0a65f85dd2576fc1555abced812bd58bf1251019 (diff) | |
download | hercules-79aa56c704ff4117511cd33be3efd0321683d89a.tar.gz hercules-79aa56c704ff4117511cd33be3efd0321683d89a.tar.bz2 hercules-79aa56c704ff4117511cd33be3efd0321683d89a.tar.xz hercules-79aa56c704ff4117511cd33be3efd0321683d89a.zip |
Fix script function return always removing references from NPC variables.
Bugreport:8642 http://hercules.ws/board/tracker/issue-8642-script-engine-issue-quo/
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/script.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c index ed9345678..b355dfa9e 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5703,7 +5703,7 @@ BUILDIN(return) { if( !st->script->local.arrays ) st->script->local.arrays = idb_alloc(DB_OPT_BASE); data->ref->arrays = st->script->local.arrays; - } else if ( name[0] == '.' /* && data->ref != NULL */ ) { + } else if ( name[0] == '.' && data->ref->vars == st->stack->stack_data[st->stack->defsp-1].u.ri->script->local.vars ) { data->ref = NULL; // Reference to the parent scope's script, remove reference pointer. } } |