summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorepoque11 <epoque11@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-04-30 12:59:01 +0000
committerepoque11 <epoque11@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-04-30 12:59:01 +0000
commita3cc6d2c92719f2a20702aad57a84d354fbdeecb (patch)
tree2766aa7ed4051986a6c7ffa8703dedb1df090b12 /src
parent3259f89ff89ccae892938cd9d01e6e23300f52d0 (diff)
downloadhercules-a3cc6d2c92719f2a20702aad57a84d354fbdeecb.tar.gz
hercules-a3cc6d2c92719f2a20702aad57a84d354fbdeecb.tar.bz2
hercules-a3cc6d2c92719f2a20702aad57a84d354fbdeecb.tar.xz
hercules-a3cc6d2c92719f2a20702aad57a84d354fbdeecb.zip
- 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
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c6
1 files changed, 2 insertions, 4 deletions
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;
}
}