From 68503609ec28be3fa2c4eb0d66b0ce0ea8815cee Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 2 Feb 2006 21:26:53 +0000 Subject: - Improved the NPC timer system to enable to have multiple timers going on at a time with different players attached to each. Now npc event timers are of two types: attached or global. The global timers don't have a player attached and can be started/halted by anyone. The character timers have a player attached, and they can only be stopped by a script that has the same player attached. - Now player attached scripts will auto-abort when the atteched player quits the map server. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5167 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/map.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/map/map.c') diff --git a/src/map/map.c b/src/map/map.c index 222ada48a..ab2a13ec7 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1475,6 +1475,8 @@ int map_quit(struct map_session_data *sd) { if(!sd->state.waitingdisconnect) { + if (sd->npc_timer_id != -1) //Cancel the event timer. + npc_timerevent_quit(sd); if (sd->state.event_disconnect) { if (script_config.event_script_type == 0) { struct npc_data *npc; -- cgit v1.2.3-60-g2f50