Browse Source

* Fixed script command 'progressbar' resuming fails on second invocation, when there was no script pause between the first and second call (bugreport:4698, since r14024).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14659 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei 14 years ago
parent
commit
5f93676dea
2 changed files with 4 additions and 1 deletions
  1. 1 0
      Changelog-Trunk.txt
  2. 3 1
      src/map/clif.c

+ 1 - 0
Changelog-Trunk.txt

@@ -1,6 +1,7 @@
 Date	Added
 
 2011/01/08
+	* Fixed script command 'progressbar' resuming fails on second invocation, when there was no script pause between the first and second call (bugreport:4698, since r14024). [Ai4rei]
 	* Fixed kill steal protection result in skill casting (unit_skilluse_id2) not getting evaluated (bugreport:1808, since r12203). [Ai4rei]
 	- Moved kill steal protection in skill casting to be only executed, after the actual target has been determined and validated (since r12203).
 	* Applied fix provided by Valaris to make /pvpinfo actually work. (bugreport:1785, since r1602). [Ai4rei]

+ 3 - 1
src/map/clif.c

@@ -8724,11 +8724,13 @@ void clif_progressbar_abort(struct map_session_data * sd)
 
 void clif_parse_progressbar(int fd, struct map_session_data * sd)
 {
+	int npc_id = sd->progressbar.npc_id;
+
 	if( gettick() < sd->progressbar.timeout && sd->st )
 		sd->st->state = END;
 
-	npc_scriptcont(sd, sd->progressbar.npc_id);
 	sd->progressbar.npc_id = sd->progressbar.timeout = 0;
+	npc_scriptcont(sd, npc_id);
 }
 
 /*==========================================