summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorshenhuyong <shenhuyong@hotmail.com>2013-10-08 01:54:20 +0800
committershenhuyong <shenhuyong@hotmail.com>2013-10-08 01:54:20 +0800
commit33622377e840c6d15ee7f65a1e4b9b9a815bd69b (patch)
tree6984312a8856cc67d5032a533eb6ad70cae19e9d /src/map/npc.c
parent0a14a122a02aeac9b8cf007eb727cdab846f2329 (diff)
parent07cbb72a3e89ba0fe1fb4b3bed1cac6568259999 (diff)
downloadhercules-33622377e840c6d15ee7f65a1e4b9b9a815bd69b.tar.gz
hercules-33622377e840c6d15ee7f65a1e4b9b9a815bd69b.tar.bz2
hercules-33622377e840c6d15ee7f65a1e4b9b9a815bd69b.tar.xz
hercules-33622377e840c6d15ee7f65a1e4b9b9a815bd69b.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
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
}