From c56e3eb701658079f1de09db759f3b09327ec046 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 7 Oct 2013 13:40:34 -0300 Subject: Fixed Bug #7744 Adjusted missing #ifdef behavior to be friendly to the hooking. http://hercules.ws/board/tracker/issue-7744-compiler-error-on-hpm-hooking-after-undefined-packetver-re/ Signed-off-by: shennetsind --- src/map/npc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/map/npc.c') diff --git a/src/map/npc.c b/src/map/npc.c index a28724238..c52dce325 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -212,11 +212,11 @@ struct npc_data* npc_name2id(const char* name) /** * For the Secure NPC Timeout option (check config/Secure.h) [RR] **/ -#ifdef SECURE_NPCTIMEOUT /** * Timer to check for idle time and timeout the dialog if necessary **/ int npc_rr_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t data) { +#ifdef SECURE_NPCTIMEOUT struct map_session_data* sd = NULL; unsigned int timeout = NPC_SECURE_TIMEOUT_NEXT; if( (sd = map->id2sd(id)) == NULL || !sd->npc_id ) { @@ -251,9 +251,9 @@ int npc_rr_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t dat sd->npc_idle_timer = INVALID_TIMER; } else //Create a new instance of ourselves to continue sd->npc_idle_timer = timer->add(timer->gettick() + (SECURE_NPCTIMEOUT_INTERVAL*1000),npc->secure_timeout_timer,sd->bl.id,0); +#endif return 0; } -#endif /*========================================== * Dequeue event and add timer for execution (100ms) @@ -4072,7 +4072,5 @@ void npc_defaults(void) { npc->do_clear_npc = do_clear_npc; npc->debug_warps_sub = npc_debug_warps_sub; npc->debug_warps = npc_debug_warps; -#ifdef SECURE_NPCTIMEOUT npc->secure_timeout_timer = npc_rr_secure_timeout_timer; -#endif } -- cgit v1.2.3-60-g2f50