summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-10-07 13:40:34 -0300
committershennetsind <ind@henn.et>2013-10-07 13:40:34 -0300
commitc56e3eb701658079f1de09db759f3b09327ec046 (patch)
treea37f7ff23a9adc9d7c725b85f94cf25685e30aba /src/map/npc.c
parentbaa5c1fc386a706ba4bf4aa48409b8947274c928 (diff)
downloadhercules-c56e3eb701658079f1de09db759f3b09327ec046.tar.gz
hercules-c56e3eb701658079f1de09db759f3b09327ec046.tar.bz2
hercules-c56e3eb701658079f1de09db759f3b09327ec046.tar.xz
hercules-c56e3eb701658079f1de09db759f3b09327ec046.zip
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 <ind@henn.et>
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c6
1 files changed, 2 insertions, 4 deletions
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
}