Pārlūkot izejas kodu

- Modified setting skillrange_by_weapon (skill.conf) to be a per-object-type setting instead of yes/no. The default now is that weapon-based skills will take the attacker's range for non-players.
- Changed the default of skillrange_by_distance to include homunculus.


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

skotlex 19 gadi atpakaļ
vecāks
revīzija
0c9d50445d
5 mainītis faili ar 14 papildinājumiem un 8 dzēšanām
  1. 6 0
      Changelog-Trunk.txt
  2. 4 4
      conf-tmpl/battle/skill.conf
  3. 2 2
      src/map/battle.c
  4. 1 1
      src/map/pc.c
  5. 1 1
      src/map/skill.c

+ 6 - 0
Changelog-Trunk.txt

@@ -4,6 +4,12 @@ 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/07/23
+	* Modified setting skillrange_by_weapon (skill.conf) to be a
+	  per-object-type setting instead of yes/no. The default now is that
+	  weapon-based skills will take the attacker's range for non-players.
+	  [Skotlex]
+	* Changed the default of skillrange_by_distance to include homunculus.
+	  [Skotlex]
 	* Fixed buildin_isequip not working correctly with non-cards. [Skotlex]
 2006/07/22
 	* Updated mob_db.sql to latest. [Skotlex]

+ 4 - 4
conf-tmpl/battle/skill.conf

@@ -74,12 +74,12 @@ skill_out_range_consume: no
 // Does the distance between caster and target define if the skill is a ranged skill? (Note 4)
 // If set, when the distance between caster and target is greater than 3 the skill is considered long-range, otherwise it's a melee range.
 // If not set, then the range is determined by the skill (eg: Double Strafe is always long-ranged). 
-// Default 6 (mobs + pets)
-skillrange_by_distance: 6
+// Default 14 (mobs + pets + homun)
+skillrange_by_distance: 14
 
-// Should the equipped weapon's range override the skill's range defined in the skill_db for most weapon-based skills? (Note 1)
+// Should the equipped weapon's range override the skill's range defined in the skill_db for most weapon-based skills? (Note 4)
 // NOTE: Skills affected by this option are those whose range in the skill_db are negative.
-skillrange_from_weapon: no
+skillrange_from_weapon: 14
 
 // Should a check on the caster's status be performed in all skill attacks?
 // When set to yes, meteors, storm gust and any other ground skills will have 

+ 2 - 2
src/map/battle.c

@@ -3735,8 +3735,8 @@ void battle_set_defaults() {
 	battle_config.left_cardfix_to_right=0;
 	battle_config.skill_add_range=0;
 	battle_config.skill_out_range_consume=1;
-	battle_config.skillrange_by_distance=BL_MOB|BL_PET;
-	battle_config.use_weapon_skill_range=0;
+	battle_config.skillrange_by_distance=BL_MOB|BL_PET|BL_HOMUNCULUS;
+	battle_config.use_weapon_skill_range=BL_MOB|BL_PET|BL_HOMUNCULUS;
 	battle_config.pc_damage_delay_rate=100;
 	battle_config.defnotenemy=0;
 	battle_config.vs_traps_bctall=BL_PC;

+ 1 - 1
src/map/pc.c

@@ -6204,7 +6204,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
 			pos = sd->equip_index[EQI_HAND_R] >= 0 ? EQP_HAND_L : EQP_HAND_R;
 	}
 
-	if (pos&EQP_HAND_R && battle_config.use_weapon_skill_range)
+	if (pos&EQP_HAND_R && battle_config.use_weapon_skill_range&BL_PC)
 	{	//Update skill-block range database when weapon range changes. [Skotlex]
 		i = sd->equip_index[EQI_HAND_R];
 		if (i < 0 || !sd->inventory_data[i]) //No data, or no weapon equipped

+ 1 - 1
src/map/skill.c

@@ -764,7 +764,7 @@ int skill_get_range2 (struct block_list *bl, int id, int lv)
 {
 	int range = skill_get_range(id, lv);
 	if(range < 0) {
-		if (battle_config.use_weapon_skill_range)
+		if (battle_config.use_weapon_skill_range&bl->type)
 			return status_get_range(bl);
 		range *=-1;
 	}