Forráskód Böngészése

- Merged Mitternacht's max_heal/max_heal_lv config settings.
- Removed support of packet 0xc3 on the new packet versions. Thanks to Meruru for pointing out they aren't being used anymore.


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

skotlex 19 éve
szülő
commit
abd2bba4de
6 módosított fájl, 26 hozzáadás és 24 törlés
  1. 3 0
      Changelog-Trunk.txt
  2. 5 0
      conf-tmpl/battle/skill.conf
  3. 4 0
      src/map/battle.c
  4. 2 0
      src/map/battle.h
  5. 7 22
      src/map/clif.c
  6. 5 2
      src/map/skill.c

+ 3 - 0
Changelog-Trunk.txt

@@ -4,6 +4,9 @@ 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/06/26
+	* Merged Mitternacht's max_heal/max_heal_lv config settings. [Skotlex]
+	* Removed support of packet 0xc3 on the new packet versions. Thanks to
+	  Meruru for pointing out they aren't being used anymore. [Skotlex]
 	* Autospells will now again check for the skill's nk value, so that skills
 	  tagged "nodamage" skills will not trigger autospells. [Skotlex]
 	* Corrected clif_item_sub so that pet eggs will correctly be sent as

+ 5 - 0
conf-tmpl/battle/skill.conf

@@ -218,6 +218,11 @@ copyskill_restrict: 2
 // Does Berserk/Frenzy cancel other self-buffs when used?
 berserk_cancels_buffs: no
 
+// Level and Strength of "MVP heal". When someone casts a heal of this level or
+// above, the heal formula is bypassed and this value is used instead.
+max_heal: 9999
+max_heal_lv: 11
+
 // Max Possible Level of Monster skills
 // Note: If your MVPs are too tough, reduce it to 10.
 mob_max_skilllvl: 100

+ 4 - 0
src/map/battle.c

@@ -3373,6 +3373,7 @@ static const struct battle_data_short {
 	{ "skill_min_damage",                  &battle_config.skill_min_damage			},
 	{ "finger_offensive_type",             &battle_config.finger_offensive_type	},
 	{ "heal_exp",                          &battle_config.heal_exp					},
+	{ "max_heal_lv",                       &battle_config.max_heal_lv	},
 	{ "resurrection_exp",                  &battle_config.resurrection_exp			},
 	{ "shop_exp",                          &battle_config.shop_exp					},
 	{ "combo_delay_rate",                  &battle_config.combo_delay_rate			},
@@ -3632,6 +3633,7 @@ static const struct battle_data_int {
 	{ "item_rate_treasure",                &battle_config.item_rate_treasure }, // End
 	{ "day_duration",                      &battle_config.day_duration	}, // added by [Yor]
 	{ "night_duration",                    &battle_config.night_duration	}, // added by [Yor]
+	{ "max_heal",                          &battle_config.max_heal },
 	{ "mob_remove_delay",                  &battle_config.mob_remove_delay	},
 	{ "sg_miracle_skill_duration",				&battle_config.sg_miracle_skill_duration },
 
@@ -3768,6 +3770,8 @@ void battle_set_defaults() {
 	battle_config.skill_min_damage=6; //Ishizu claims that magic and misc attacks always do at least div_ damage. [Skotlex]
 	battle_config.finger_offensive_type=0;
 	battle_config.heal_exp=0;
+	battle_config.max_heal=9999;
+	battle_config.max_heal_lv=11;
 	battle_config.resurrection_exp=0;
 	battle_config.shop_exp=0;
 	battle_config.combo_delay_rate=100;

+ 2 - 0
src/map/battle.h

@@ -189,6 +189,8 @@ extern struct Battle_Config {
 	unsigned short skill_min_damage;
 	unsigned short finger_offensive_type;
 	unsigned short heal_exp;
+	unsigned short max_heal_lv;
+	int max_heal; //Mitternacht
 	unsigned short resurrection_exp;
 	unsigned short shop_exp;
 	unsigned short combo_delay_rate;

+ 7 - 22
src/map/clif.c

@@ -2839,7 +2839,7 @@ int clif_changelook(struct block_list *bl,int type,int val)
 		WBUFW(buf,9)=vd->shield;
 		clif_send(buf,packet_len_table[0x1d7],bl,AREA);
 	}
-	else if(type == LOOK_BASE && val > 255)
+	else
 	{
 		WBUFW(buf,0)=0x1d7;
 		WBUFL(buf,2)=bl->id;
@@ -2847,12 +2847,6 @@ int clif_changelook(struct block_list *bl,int type,int val)
 		WBUFW(buf,7)=val;
 		WBUFW(buf,9)=0;
 		clif_send(buf,packet_len_table[0x1d7],bl,AREA);
-	} else {
-		WBUFW(buf,0)=0xc3;
-		WBUFL(buf,2)=bl->id;
-		WBUFB(buf,6)=type;
-		WBUFB(buf,7)=val;
-		clif_send(buf,packet_len_table[0xc3],bl,AREA);
 	}
 #endif
 	return 0;
@@ -2869,21 +2863,12 @@ void clif_changetraplook(struct block_list *bl,int val)
 	WBUFB(buf,7)=val;
 	clif_send(buf,packet_len_table[0xc3],bl,AREA);
 #else
-	if (val > 255)
-	{
-		WBUFW(buf,0)=0x1d7;
-		WBUFL(buf,2)=bl->id;
-		WBUFB(buf,6)=LOOK_BASE;
-		WBUFW(buf,7)=val;
-		WBUFW(buf,9)=0;
-		clif_send(buf,packet_len_table[0x1d7],bl,AREA);
-	} else {
-		WBUFW(buf,0)=0xc3;
-		WBUFL(buf,2)=bl->id;
-		WBUFB(buf,6)=LOOK_BASE;
-		WBUFB(buf,7)=val;
-		clif_send(buf,packet_len_table[0xc3],bl,AREA);
-	}
+	WBUFW(buf,0)=0x1d7;
+	WBUFL(buf,2)=bl->id;
+	WBUFB(buf,6)=LOOK_BASE;
+	WBUFW(buf,7)=val;
+	WBUFW(buf,9)=0;
+	clif_send(buf,packet_len_table[0x1d7],bl,AREA);
 #endif
 
 	

+ 5 - 2
src/map/skill.c

@@ -801,9 +801,14 @@ int skill_get_range2 (struct block_list *bl, int id, int lv)
 int skill_calc_heal (struct block_list *bl, int skill_lv)
 {
 	int skill, heal;
+
+	if (skill_lv >= battle_config.max_heal_lv)
+		return battle_config.max_heal;
+
 	heal = ( status_get_lv(bl)+status_get_int(bl) )/8 *(4+ skill_lv*8);
 	if(bl->type == BL_PC && (skill = pc_checkskill((TBL_PC*)bl, HP_MEDITATIO)) > 0)
 		heal += heal * skill * 2 / 100;
+
 	return heal;
 }
 
@@ -3152,8 +3157,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 			int heal = skill_calc_heal(src, skilllv);
 			int heal_get_jobexp;
 	
-			if (skilllv > 10)
-				heal = 9999; //9999ヒール
 			if (status_isimmune(bl) || (dstmd && dstmd->class_ == MOBID_EMPERIUM))
 				heal=0;	/* 黄金蟲カード(ヒール量0) */
 			if (sd) {