summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorHaruna <haru@dotalux.com>2015-11-18 15:11:54 +0100
committerHaruna <haru@dotalux.com>2015-11-18 15:11:54 +0100
commit8ccf62de1675498991c5795ce1a63f414273290f (patch)
tree2680f3e1ff72c89adc694b5151833483286f0e5f /src/map/npc.c
parentc7f6a3daec449964459e70c0d76fadbc9fdf1345 (diff)
parent583ecd7e050413a4a6bd3845fb6124a3770abeb0 (diff)
downloadhercules-8ccf62de1675498991c5795ce1a63f414273290f.tar.gz
hercules-8ccf62de1675498991c5795ce1a63f414273290f.tar.bz2
hercules-8ccf62de1675498991c5795ce1a63f414273290f.tar.xz
hercules-8ccf62de1675498991c5795ce1a63f414273290f.zip
Merge pull request #837 from AnnieRuru/request_5
Add new config to allow player vend/chat room nearby hidden npc (#834)
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 9573c1c6f..6ecc22282 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -137,6 +137,9 @@ int npc_isnear_sub(struct block_list* bl, va_list args) {
if( nd->option & (OPTION_HIDE|OPTION_INVISIBLE) )
return 0;
+ if( battle_config.vendchat_near_hiddennpc && ( nd->class_ == FAKE_NPC || nd->class_ == HIDDEN_WARP_CLASS ) )
+ return 0;
+
return 1;
}
@@ -4685,7 +4688,7 @@ int do_init_npc(bool minimal) {
npc->fake_nd = (struct npc_data *)aCalloc(1,sizeof(struct npc_data));
npc->fake_nd->bl.m = -1;
npc->fake_nd->bl.id = npc->get_new_npc_id();
- npc->fake_nd->class_ = -1;
+ npc->fake_nd->class_ = FAKE_NPC;
npc->fake_nd->speed = 200;
strcpy(npc->fake_nd->name,"FAKE_NPC");
memcpy(npc->fake_nd->exname, npc->fake_nd->name, 9);