Selaa lähdekoodia

- Fixed a pair of compilation logic errors.
- status_get_sc_tick will now use directly Stun's formula rather than invoking the status sc chance once.


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

skotlex 19 vuotta sitten
vanhempi
commit
b59d433a35
2 muutettua tiedostoa jossa 7 lisäystä ja 3 poistoa
  1. 2 0
      Changelog-Trunk.txt
  2. 5 3
      src/map/status.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.
 
 2006/05/22
+	* status_get_sc_tick will now use directly Stun's formula rather than
+	  invoking the status sc chance once. [Skotlex]
 	* Fixed a possible null pointer in script command misc_effect [Skotlex]
 	* Modified Investigate to take into consideration final def/vit-def rather
 	  than base values for damage adjustment. [Skotlex]

+ 5 - 3
src/map/status.c

@@ -3079,7 +3079,8 @@ int status_get_amotion(struct block_list *bl)
 				aspd_rate -= aspd_rate * 10*((struct mob_data *)bl)->guardian_data->guardup_lv/100; // Strengthen Guardians - custom value +10% ASPD / lv
 		} else if(bl->type==BL_PET)
 			amotion = ((struct pet_data *)bl)->db->amotion;
-		else if(bl->type==BL_HOMUNCULUS) ((struct homun_data *)bl)->amotion;	//[blackhole89]
+		else if(bl->type==BL_HOMUNCULUS)
+			amotion = ((struct homun_data *)bl)->amotion;	//[blackhole89]
 
 		aspd_rate = status_calc_aspd_rate(bl,aspd_rate);
 
@@ -3109,7 +3110,8 @@ int status_get_dmotion(struct block_list *bl)
 	}
 	else if(bl->type==BL_PET)
 		ret=((struct pet_data *)bl)->db->dmotion;
-	else if(bl->type==BL_HOMUNCULUS) ((struct homun_data *)bl)->dmotion;	//[blackhole89]
+	else if(bl->type==BL_HOMUNCULUS)
+		ret=((struct homun_data *)bl)->dmotion;	//[blackhole89]
 	else
 		return 2000;
 
@@ -3614,7 +3616,7 @@ int status_get_sc_tick(struct block_list *bl, int type, int tick)
 			rate = 100*status_get_mdef(bl);
 		break;
 		case SC_STUN:	//Reduction in duration is the same as reduction in rate.
-			rate = status_get_sc_def(bl, type);
+			rate = 300 +100*status_get_vit(bl) +33*status_get_luk(bl);
 		break;
 		case SC_DPOISON:			/* –Ò“Å */
 		case SC_POISON:				/* “Å */