ソースを参照

- Removed the setting of blow-count to 0 when the target is a boss on the battle_calc_* functions, now skill_blown will fail when the source is different from the target and the target is a boss.
- Some parenthesis cleanup before invoking battle_calc_base_damage, could be fixing the current issue with arrow attacks not adding the arrow damage.


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

skotlex 19 年 前
コミット
71b9605a0c
3 ファイル変更10 行追加13 行削除
  1. 5 0
      Changelog-Trunk.txt
  2. 1 11
      src/map/battle.c
  3. 4 2
      src/map/skill.c

+ 5 - 0
Changelog-Trunk.txt

@@ -4,6 +4,11 @@ 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/08/07
+	* Moved the "bosses can't be knockback" logic from battle_calc_* functions
+	  and placed it on skill_blown. [Skotlex]
+	* Some parenthesis cleanup before invoking battle_calc_base_damage, could
+	  be fixing the current issue with arrow attacks not adding the arrow damage.
+	  [Skotlex]
 	* Fixed the map_search_freecell error which was making mobs fail to
 	  respawn. [Skotlex]
 	* Added in Lupus's suggestion of not making multi-slot headgears set all

+ 1 - 11
src/map/battle.c

@@ -911,9 +911,6 @@ static struct Damage battle_calc_weapon_attack(
 			wd.flag=(wd.flag&~BF_RANGEMASK)|BF_LONG;
 	}
 	
-	if(is_boss(target)) //Bosses can't be knocked-back
-		wd.blewcount = 0;
-
 /* Apparently counter attack no longer causes you to be critical'ed by mobs. [Skotlex]
 	//Check for counter 
 	if(!skill_num)
@@ -1209,7 +1206,7 @@ static struct Damage battle_calc_weapon_attack(
 					(flag.arrow?2:0)|
 					(skill_num == HW_MAGICCRASHER?4:0)|
 					(skill_num == MO_EXTREMITYFIST?8:0)|
-					(sc && sc->data[SC_WEAPONPERFECTION].timer!=-1)?8:0;
+					(sc && sc->data[SC_WEAPONPERFECTION].timer!=-1?8:0);
 				if (flag.arrow && sd)
 				switch(sd->status.weapon) {
 				case W_BOW:
@@ -2215,9 +2212,6 @@ struct Damage battle_calc_magic_attack(
 			break;
 	}
 
-	if(is_boss(target)) //Bosses can't be knocked-back
-		ad.blewcount = 0;
-
 	if (!flag.infdef) //No need to do the math for plants
 	{
 
@@ -2527,9 +2521,6 @@ struct Damage  battle_calc_misc_attack(
 		}
 	}
 
-	if(is_boss(target))
-		md.blewcount = 0;
-
 	s_ele = skill_get_pl(skill_num);
 	if (s_ele < 0) //Attack that takes weapon's element for misc attacks? Make it neutral [Skotlex]
 		s_ele = ELE_NEUTRAL;
@@ -3504,7 +3495,6 @@ static const struct battle_data_short {
 	{ "mob_count_rate",                    &battle_config.mob_count_rate			},
 	{ "mob_spawn_delay",                   &battle_config.mob_spawn_delay			},
 	{ "no_spawn_on_player",                &battle_config.no_spawn_on_player	},
-
 	{ "force_random_spawn",                &battle_config.force_random_spawn	},
 	{ "plant_spawn_delay",                 &battle_config.plant_spawn_delay			},
 	{ "boss_spawn_delay",                  &battle_config.boss_spawn_delay			},

+ 4 - 2
src/map/skill.c

@@ -1705,6 +1705,8 @@ int skill_blown (struct block_list *src, struct block_list *target, int count)
 		case BL_MOB:
 			if (((TBL_MOB*)target)->class_ == MOBID_EMPERIUM)
 				return 0;
+			if(src != target && is_boss(target)) //Bosses can't be knocked-back
+				return 0;
 			break;
 		case BL_SKILL:
 			su=(struct skill_unit *)target;
@@ -2938,14 +2940,14 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
 		if(flag&1){
 			if (bl->id==skill_area_temp[1])
 				break;
-			if (skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0x0500) && !status_get_mexp(bl))
+			if (skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0x0500))
 				skill_blown(src,bl,skill_area_temp[2]);
 		} else {
 			int x=bl->x,y=bl->y,i,dir;
 			dir = map_calc_dir(bl,src->x,src->y);
 			skill_area_temp[1] = bl->id;
 			skill_area_temp[2] = skill_get_blewcount(skillid,skilllv)|dir<<20;
-			if (skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0) && !status_get_mexp(bl))
+			if (skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0))
 				skill_blown(src,bl,skill_area_temp[2]);
 			for (i=0;i<4;i++) {
 				map_foreachincell(skill_area_sub,bl->m,x,y,BL_CHAR,