From 49f8efc63324fdb1db8fd7110508988370ddfe01 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 5 Nov 2015 17:18:59 +0300 Subject: Add pseudo npc varibale .alwaysVisible for show npc from any range on map. --- src/emap/script.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/emap/script.c') 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; } -- cgit v1.2.3-70-g09d2