diff options
author | Haru <haru@dotalux.com> | 2014-02-24 10:21:27 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-03-05 22:35:02 +0100 |
commit | d25cc9b7dbc103cf1454db37159ffffeedaac149 (patch) | |
tree | 0e4af566382b946797aa9de21df70b9bdf9d88fa /src/map/npc.c | |
parent | 78bf8d26567a2054bd9ff5268f9f73cb07d82b98 (diff) | |
download | hercules-d25cc9b7dbc103cf1454db37159ffffeedaac149.tar.gz hercules-d25cc9b7dbc103cf1454db37159ffffeedaac149.tar.bz2 hercules-d25cc9b7dbc103cf1454db37159ffffeedaac149.tar.xz hercules-d25cc9b7dbc103cf1454db37159ffffeedaac149.zip |
Ref redesign, part 2
- Reorganized regs var/array DBMaps into a specific reg_db structure
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index fa2fa1ead..7933f6d43 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3337,11 +3337,10 @@ const char* npc_parse_function(char* w1, char* w2, char* w3, char* w4, const cha return end; func_db = script->userfunc_db; - if (func_db->put(func_db, DB->str2key(w3), DB->ptr2data(scriptroot), &old_data)) - { + if (func_db->put(func_db, DB->str2key(w3), DB->ptr2data(scriptroot), &old_data)) { struct script_code *oldscript = (struct script_code*)DB->data2ptr(&old_data); ShowWarning("npc_parse_function: Overwriting user function [%s] in file '%s', line '%d'.\n", w3, filepath, strline(buffer,start-buffer)); - script->free_vars(oldscript->script_vars); + script->free_vars(oldscript->local.vars); aFree(oldscript->script_buf); aFree(oldscript); } |