diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-19 17:58:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-19 17:58:09 +0300 |
commit | 64f9384c639650498995437bc5ecbd1aadd0b8c2 (patch) | |
tree | 2b91df345e24a81c267776b1b52318bcf93048aa /src/emap | |
parent | 7910c013eeda513e26711c61a650d23a581b9f28 (diff) | |
download | evol-hercules-64f9384c639650498995437bc5ecbd1aadd0b8c2.tar.gz evol-hercules-64f9384c639650498995437bc5ecbd1aadd0b8c2.tar.bz2 evol-hercules-64f9384c639650498995437bc5ecbd1aadd0b8c2.tar.xz evol-hercules-64f9384c639650498995437bc5ecbd1aadd0b8c2.zip |
Add .srcId npc variable for get src_id field of npc.
Diffstat (limited to 'src/emap')
-rw-r--r-- | src/emap/script.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/emap/script.c b/src/emap/script.c index 4af2cb1..9f19693 100644 --- a/src/emap/script.c +++ b/src/emap/script.c @@ -220,6 +220,12 @@ void eset_reg_npcscope_num_pre(struct script_state **stPtr, map_alwaysVisible_delete(&nd->bl); hookStop(); } + else if (!strcmp(name, ".srcId")) + { + ShowWarning("you cant assign '.srcId'\n"); + script->reportsrc(st); + hookStop(); + } } int eget_val_npcscope_num_pre(struct script_state **stPtr, @@ -309,6 +315,12 @@ int eget_val_npcscope_num_pre(struct script_state **stPtr, hookStop(); return res; } + else if (!strcmp(name, ".srcId")) + { + getExt1Return(0); + hookStop(); + return nd->src_id; + } return 0; } |