Sfoglia il codice sorgente

* Job_Battle_Manual and Battle_Manual can be used simultaneously.
* Fixed "sleep" after "attachrid" (a different rid) halts the script.(bugreport:3181)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13846 54d463be-8e91-2dee-dedb-b68131a5f0ec

Inkfish 16 anni fa
parent
commit
c10a8581a5
3 ha cambiato i file con 8 aggiunte e 1 eliminazioni
  1. 3 0
      Changelog-Trunk.txt
  2. 4 1
      src/map/pc.c
  3. 1 0
      src/map/script.c

+ 3 - 0
Changelog-Trunk.txt

@@ -3,6 +3,9 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
+09/06/05
+	* Job_Battle_Manual and Battle_Manual can be used simultaneously. [Inkfish]
+	* Fixed "sleep" after "attachrid" (a different rid) halts the script. [Inkfish]
 09/06/04
 	* Fixed turning off a skill needed to meet the requirements. [Inkfish]
 	* Skills used through items which don't have aftercast delay or cast time now don't overwrite the former canact_tick. [Inkfish]

+ 4 - 1
src/map/pc.c

@@ -3406,10 +3406,13 @@ int pc_isUseitem(struct map_session_data *sd,int n)
 		case 14532: // Battle_Manual25
 		case 14533: // Battle_Manual100
 		case 14545: // Battle_Manual300
-		case 14592: // JOB_Battle_Manual
 			if( sd->sc.data[SC_EXPBOOST] )
 				return 0;
 			break;
+		case 14592: // JOB_Battle_Manual
+			if( sd->sc.data[SC_JEXPBOOST] )
+				return 0;
+			break;
 
 		// Mercenary Items
 

+ 1 - 0
src/map/script.c

@@ -3203,6 +3203,7 @@ void run_script_main(struct script_state *st)
 
 	if(st->sleep.tick > 0) {
 		//Delay execution
+		sd = map_id2sd(st->rid); // Refresh sd since script might have attached someone while running. [Inkfish]
 		st->sleep.charid = sd?sd->status.char_id:0;
 		st->sleep.timer  = add_timer(gettick()+st->sleep.tick,
 			run_script_timer, st->sleep.charid, (intptr)st);