Selaa lähdekoodia

* [Fixed]:
- Typo in status.c add_sc() using 'skill' instead of 'sk' as index, resulting in filling the SkillStatusChangeTableArray with junk data.
- > NEEDS CONFIRMATION < Ends casting if player is knocked with freezing/stun/whatever

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

Lance 19 vuotta sitten
vanhempi
commit
6d57c556d9
2 muutettua tiedostoa jossa 8 lisäystä ja 2 poistoa
  1. 3 0
      Changelog-Trunk.txt
  2. 5 2
      src/map/status.c

+ 3 - 0
Changelog-Trunk.txt

@@ -5,6 +5,9 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2006/06/18
 	* [Fixed]:
+	  - Typo in status.c add_sc() using 'skill' instead of 'sk' as index, resulting in
+	    filling the SkillStatusChangeTableArray with junk data.
+	  - > NEEDS CONFIRMATION < Ends casting if player is knocked with freezing/stun/whatever
 	  - Typo in parse_frommap. [Lance]
 	* [Fixed]:
 	  - clif_initialstatus using SHRT_MAX instead of USHRT_MAX for status_point.

+ 5 - 2
src/map/status.c

@@ -66,8 +66,8 @@ static void add_sc(int skill, int sc)
 			ShowError("add_sc: Unsupported skill id %d\n", skill);
 		return;
 	}
-	if (SkillStatusChangeTableArray[skill]==-1)
-	  	SkillStatusChangeTableArray[skill] = sc;
+	if (SkillStatusChangeTableArray[sk]==-1) // skill -> sk [Lance]
+	  	SkillStatusChangeTableArray[sk] = sc;
 	if (StatusSkillChangeTable[sc]==0)
 	  	StatusSkillChangeTable[sc] = skill;
 }
@@ -4107,6 +4107,9 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
 		case SC_STUN:
 			if (sc->opt1)
 				return 0; //Cannot override other opt1 status changes. [Skotlex]
+			// Cancel all casting upon sleep/stun/freeze/stone [Lance]
+			// http://www.eathena.ws/board/index.php?showtopic=102679
+			unit_skillcastcancel(bl, 0);
 		break;
 		case SC_CURSE:
 			//Dark Elementals are inmune to curse.