diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-19 01:00:50 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-19 17:37:00 +0300 |
commit | 7910c013eeda513e26711c61a650d23a581b9f28 (patch) | |
tree | 743e691c364508786b27cede22cb2a455204ed9c /src/emap/status.c | |
parent | 2cfa1a8f0f8bb224654126eb08b67566ee4bc721 (diff) | |
download | evol-hercules-7910c013eeda513e26711c61a650d23a581b9f28.tar.gz evol-hercules-7910c013eeda513e26711c61a650d23a581b9f28.tar.bz2 evol-hercules-7910c013eeda513e26711c61a650d23a581b9f28.tar.xz evol-hercules-7910c013eeda513e26711c61a650d23a581b9f28.zip |
Allow full npc copy in instances.
Diffstat (limited to 'src/emap/status.c')
-rw-r--r-- | src/emap/status.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/emap/status.c b/src/emap/status.c index 90c25d4..1b27a0f 100644 --- a/src/emap/status.c +++ b/src/emap/status.c @@ -10,6 +10,7 @@ #include "common/HPMi.h" #include "common/memmgr.h" #include "common/mmo.h" +#include "common/nullpo.h" #include "common/socket.h" #include "common/strlib.h" #include "map/itemdb.h" @@ -21,6 +22,8 @@ #include "plugins/HPMHooking.h" +#include "emap/npc.h" + #include "emap/horse.h" #include "emap/data/itemd.h" #include "emap/data/npcd.h" @@ -52,13 +55,7 @@ void estatus_set_viewdata_post(struct block_list *bl, if (npc->subtype == SCRIPT) { if (npc->u.scr.script) - { - // here some magic to set npc local variable .id to bl.id - const int num = (int)reference_uid(script->add_str(".id"), 0); - if (!npc->u.scr.script->local.vars) - npc->u.scr.script->local.vars = i64db_alloc(DB_OPT_RELEASE_DATA); - i64db_iput(npc->u.scr.script->local.vars, num, npc->bl.id); - } + enpc_set_var_num(npc, ".id", npc->bl.id); } } } |