Browse Source

- 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
epoque11 13 năm trước cách đây
mục cha
commit
3e22697410
1 tập tin đã thay đổi với 2 bổ sung4 xóa
  1. 2 4
      src/map/script.c

+ 2 - 4
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;
 		}
 	}