From a3cc6d2c92719f2a20702aad57a84d354fbdeecb Mon Sep 17 00:00:00 2001 From: epoque11 Date: Mon, 30 Apr 2012 12:59:01 +0000 Subject: - Amended the permanent NPC variable instance system to utilise the same allocated DBMap** (follow-up to r16018) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16019 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/map/script.c b/src/map/script.c index 70c43b6a1..98f11bb9e 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -4469,12 +4469,10 @@ BUILDIN_FUNC(callfunc) if( data_isreference(data) && !data->ref ) { const char* name = reference_getname(data); - if( name[0] == '.' && name[1] == '@' ) { + if( name[0] == '.' ) { data->ref = (struct DBMap**)aCalloc(sizeof(struct DBMap*), 1); - data->ref[0] = st->stack->var_function; + data->ref[0] = (name[1] == '@' ? st->stack->var_function : st->script->script_vars); } - else if( name[0] == '.' ) - data->ref = &st->script->script_vars; } } -- cgit v1.2.3-70-g09d2