From 583ecd7e050413a4a6bd3845fb6124a3770abeb0 Mon Sep 17 00:00:00 2001 From: AnnieRuru Date: Sat, 31 Oct 2015 00:08:22 +0800 Subject: Add new config to allow player vend/chat room nearby hidden npc make changes to (#837) - mske better battle_config clarification - Add FAKE_NPC constant in the source and use them - also use the HIDDEN_WARP_NPC constants --- src/map/npc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/map/npc.c') diff --git a/src/map/npc.c b/src/map/npc.c index 017d60fff..16fc07fe8 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -137,7 +137,7 @@ 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_ == -1 || nd->class_ == 139 ) ) + if( battle_config.vendchat_near_hiddennpc && ( nd->class_ == FAKE_NPC || nd->class_ == HIDDEN_WARP_CLASS ) ) return 0; return 1; @@ -4646,7 +4646,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); -- cgit v1.2.3-70-g09d2