From 3265481434f0dfd9e3e74cc8640803973f05f2c3 Mon Sep 17 00:00:00 2001 From: skotlex Date: Sun, 2 Apr 2006 18:25:46 +0000 Subject: - Fixed npc_gettimerevent_tick returning the difference since the last triggered label instead of total elapsed time for the npc-timer. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5874 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 2 ++ src/map/npc.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 1ca40ef66..77399ed8c 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/04/02 + * Fixed npc_gettimerevent_tick returning the difference since the last + triggered label instead of total elapsed time for the npc-timer. [Skotlex] * Added a missing memset on ers_alloc'ing mob loot which was making data from looted items fill in normal drop info (in other words, you could get normal loots that were named after players, for example) [Skotlex] diff --git a/src/map/npc.c b/src/map/npc.c index b5dd3f42a..d58f4ec66 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -756,10 +756,10 @@ int npc_gettimerevent_tick(struct npc_data *nd) //If within a timer, set the tick value to the time passed since the beginning of the timer. if (sd) { if(sd->npc_timer_id != -1) - tick = DIFF_TICK(gettick(), nd->u.scr.timertick); + tick += DIFF_TICK(gettick(), nd->u.scr.timertick); } else { if(nd->u.scr.timerid!=-1) - tick = DIFF_TICK(gettick(), nd->u.scr.timertick); + tick += DIFF_TICK(gettick(), nd->u.scr.timertick); } return tick; -- cgit v1.2.3-70-g09d2