Forráskód Böngészése

- 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://svn.code.sf.net/p/rathena/svn/trunk@5874 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 éve
szülő
commit
be26d920ed
2 módosított fájl, 4 hozzáadás és 2 törlés
  1. 2 0
      Changelog-Trunk.txt
  2. 2 2
      src/map/npc.c

+ 2 - 0
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.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 
 2006/04/02
 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
 	* 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
 	  from looted items fill in normal drop info (in other words, you could get
 	  normal loots that were named after players, for example) [Skotlex]
 	  normal loots that were named after players, for example) [Skotlex]

+ 2 - 2
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 within a timer, set the tick value to the time passed since the beginning of the timer.
 	if (sd) {
 	if (sd) {
 		if(sd->npc_timer_id != -1)
 		if(sd->npc_timer_id != -1)
-			tick = DIFF_TICK(gettick(), nd->u.scr.timertick);
+			tick += DIFF_TICK(gettick(), nd->u.scr.timertick);
 	} else {
 	} else {
 		if(nd->u.scr.timerid!=-1)
 		if(nd->u.scr.timerid!=-1)
-			tick = DIFF_TICK(gettick(), nd->u.scr.timertick);
+			tick += DIFF_TICK(gettick(), nd->u.scr.timertick);
 	}
 	}
 
 
 	return tick;
 	return tick;