diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-07 02:52:55 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-07 02:52:55 +0000 |
commit | f33806e6fd7e6e7f41cb87a47b6c4727636394d2 (patch) | |
tree | c3d6880bdde3a1a766e905f36dfca529f3874da9 | |
parent | 5b403ede768abc599e20652254bb758d7eebec6e (diff) | |
download | hercules-f33806e6fd7e6e7f41cb87a47b6c4727636394d2.tar.gz hercules-f33806e6fd7e6e7f41cb87a47b6c4727636394d2.tar.bz2 hercules-f33806e6fd7e6e7f41cb87a47b6c4727636394d2.tar.xz hercules-f33806e6fd7e6e7f41cb87a47b6c4727636394d2.zip |
- Fixed startnpctimer starting multiple timers if the npc timer was already started.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5208 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/map/npc.c | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index f6dceae4e..8f8041da4 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -5,6 +5,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
2006/02/06
+ * Fixed startnpctimer starting multiple timers instead of failing when the
+ npc timer is already running. [Skotlex]
* Venom Splasher update: [Skotlex]
- always hits (but splash damage targets can still avoid it)
- Being hit does not cancels it,
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();
|