From 3e226974101c10b4390659794c54bec1268e1ae1 Mon Sep 17 00:00:00 2001 From: epoque11 Date: Mon, 30 Apr 2012 12:59:01 +0000 Subject: [PATCH] - Amended the permanent NPC variable instance system to utilise the same allocated DBMap** (follow-up to r16018) git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16019 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/map/script.c b/src/map/script.c index 70c43b6a1b..98f11bb9ee 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; } }