diff options
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index e02b31741..9d6d25cbb 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -640,6 +640,13 @@ int npc_timerevent_start(struct npc_data *nd, int rid) return 1;
}
}
+ //Check if timer is already started.
+ if (sd) {
+ if (sd->npc_timer_id != -1)
+ return 0;
+ } else if (nd->u.scr.timerid != -1)
+ return 0;
+
ted = ers_alloc(timer_event_ers, struct timer_event_data);
ted->next = j;
nd->u.scr.timertick=ted->otick=gettick();
|