summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-19 17:58:09 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-19 17:58:09 +0300
commit64f9384c639650498995437bc5ecbd1aadd0b8c2 (patch)
tree2b91df345e24a81c267776b1b52318bcf93048aa /src
parent7910c013eeda513e26711c61a650d23a581b9f28 (diff)
downloadplugin-64f9384c639650498995437bc5ecbd1aadd0b8c2.tar.gz
plugin-64f9384c639650498995437bc5ecbd1aadd0b8c2.tar.bz2
plugin-64f9384c639650498995437bc5ecbd1aadd0b8c2.tar.xz
plugin-64f9384c639650498995437bc5ecbd1aadd0b8c2.zip
Add .srcId npc variable for get src_id field of npc.
Diffstat (limited to 'src')
-rw-r--r--src/emap/script.c12
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;
}