summaryrefslogtreecommitdiff
path: root/src/emap/script.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-05 17:18:59 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-05 17:18:59 +0300
commit49f8efc63324fdb1db8fd7110508988370ddfe01 (patch)
treee345ad5d7ac12c8341157612e0addf298aaea6b8 /src/emap/script.c
parent79fd3bacf40f3496dcc8e952fa9f84c8dbbb23ca (diff)
downloadplugin-49f8efc63324fdb1db8fd7110508988370ddfe01.tar.gz
plugin-49f8efc63324fdb1db8fd7110508988370ddfe01.tar.bz2
plugin-49f8efc63324fdb1db8fd7110508988370ddfe01.tar.xz
plugin-49f8efc63324fdb1db8fd7110508988370ddfe01.zip
Add pseudo npc varibale .alwaysVisible for show npc from any range on map.
Diffstat (limited to 'src/emap/script.c')
-rw-r--r--src/emap/script.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/emap/script.c b/src/emap/script.c
index b8f54a0..0cadc03 100644
--- a/src/emap/script.c
+++ b/src/emap/script.c
@@ -177,6 +177,15 @@ void eset_reg_npcscope_num(struct script_state* st, struct reg_db *n, int64 *num
ext->walkMask = *val;
hookStop();
}
+ else if (!strcmp(name, ".alwaysVisible"))
+ {
+ getExt1();
+ if (*val)
+ map_alwaysVisible_add(&nd->bl);
+ else
+ map_alwaysVisible_delete(&nd->bl);
+ hookStop();
+ }
}
int eget_val_npcscope_num(struct script_state* st, struct reg_db *n, struct script_data* data)
@@ -254,6 +263,13 @@ int eget_val_npcscope_num(struct script_state* st, struct reg_db *n, struct scri
hookStop();
return ext->walkMask;
}
+ else if (!strcmp(name, ".alwaysVisible"))
+ {
+ getExt1Return(0);
+ bool res = map_alwaysVisible_find(&nd->bl);
+ hookStop();
+ return res;
+ }
return 0;
}