Bläddra i källkod

Follow up to eca4fa0.
* Fixed a multi-hit damage issue for Falcon Assault (bugreport:8447).
* Fixed unsigned int specifier for sprint (bugreport:8448).
* Fixed WE_MALE and WE_FEMALE checking target rather than caster (bugreport:8449).

aleos89 11 år sedan
förälder
incheckning
65d1ee32e4
4 ändrade filer med 8 tillägg och 7 borttagningar
  1. 1 1
      src/map/atcommand.c
  2. 4 3
      src/map/battle.c
  3. 1 1
      src/map/clif.c
  4. 2 2
      src/map/skill.c

+ 1 - 1
src/map/atcommand.c

@@ -7942,7 +7942,7 @@ ACMD_FUNC(duel)
 	}
 
 	if( message[0] ) {
-		if(sscanf(message, "%ui", &maxpl) >= 1) {
+		if(sscanf(message, "%u", &maxpl) >= 1) {
 			if(maxpl < 2 || maxpl > 65535) {
 				clif_displaymessage(fd, msg_txt(sd,357)); // "Duel: Invalid value."
 				return 0;

+ 4 - 3
src/map/battle.c

@@ -5467,7 +5467,6 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
  */
 struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int mflag)
 {
-	int skill;
 #ifdef ADJUST_SKILL_DAMAGE
 	int skill_damage;
 #endif
@@ -5541,6 +5540,8 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
 #endif
 	case HT_BLITZBEAT:
 	case SN_FALCONASSAULT:
+	{
+		uint8 skill;
 		//Blitz-beat Damage.
 		if(!sd || (skill = pc_checkskill(sd,HT_STEELCROW)) <= 0)
 			skill=0;
@@ -5550,12 +5551,12 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
 
 		if (skill_id == SN_FALCONASSAULT) {
 			//Div fix of Blitzbeat
-			md.div_ = skill_get_num(HT_BLITZBEAT, 5);
-			damage_div_fix(md.damage, md.div_);
+			damage_div_fix2(md.damage, skill_get_num(HT_BLITZBEAT, 5));
 
 			//Falcon Assault Modifier
 			md.damage=(int64)md.damage*(150+70*skill_lv)/100;
 		}
+	}
 		break;
 	case TF_THROWSTONE:
 		md.damage=50;

+ 1 - 1
src/map/clif.c

@@ -8746,7 +8746,7 @@ void clif_charnameack (int fd, struct block_list *bl)
 				if( battle_config.show_mob_info&1 )
 					str_p += sprintf(str_p, "HP: %u/%u | ", md->status.hp, md->status.max_hp);
 				if( battle_config.show_mob_info&2 )
-					str_p += sprintf(str_p, "HP: %ui%% | ", get_percentage(md->status.hp, md->status.max_hp));
+					str_p += sprintf(str_p, "HP: %u%% | ", get_percentage(md->status.hp, md->status.max_hp));
 				//Even thought mobhp ain't a name, we send it as one so the client
 				//can parse it. [Skotlex]
 				if( str_p != mobhp )

+ 2 - 2
src/map/skill.c

@@ -7253,14 +7253,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 		break;
 
 	case WE_MALE:
-		if( status_get_hp(bl) > status_get_max_hp(bl) / 10 ) {
+		if( status_get_hp(src) > status_get_max_hp(src) / 10 ) {
 			int hp_rate=(!skill_lv)? 0:skill_get_hp_rate(skill_id, skill_lv);
 			int gain_hp= tstatus->max_hp*abs(hp_rate)/100; // The earned is the same % of the target HP than it costed the caster. [Skotlex]
 			clif_skill_nodamage(src,bl,skill_id,status_heal(bl, gain_hp, 0, 0),1);
 		}
 		break;
 	case WE_FEMALE:
-		if( status_get_sp(bl) > status_get_max_sp(bl) / 10 ) {
+		if( status_get_sp(src) > status_get_max_sp(src) / 10 ) {
 			int sp_rate=(!skill_lv)? 0:skill_get_sp_rate(skill_id, skill_lv);
 			int gain_sp=tstatus->max_sp*abs(sp_rate)/100;// The earned is the same % of the target SP than it costed the caster. [Skotlex]
 			clif_skill_nodamage(src,bl,skill_id,status_heal(bl, 0, gain_sp, 0),1);