summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--conf-tmpl/battle/skill.conf5
-rw-r--r--src/map/battle.c4
-rw-r--r--src/map/battle.h2
-rw-r--r--src/map/clif.c29
-rw-r--r--src/map/skill.c7
6 files changed, 26 insertions, 24 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index f575040eb..d005d5d41 100644
--- a/Changelog-Trunk.txt
+++ b/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
diff --git a/conf-tmpl/battle/skill.conf b/conf-tmpl/battle/skill.conf
index ec863e97b..35314a99d 100644
--- a/conf-tmpl/battle/skill.conf
+++ b/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
diff --git a/src/map/battle.c b/src/map/battle.c
index 9c28f0867..f92aa3ff9 100644
--- a/src/map/battle.c
+++ b/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;
diff --git a/src/map/battle.h b/src/map/battle.h
index 0d1669deb..6f59f2204 100644
--- a/src/map/battle.h
+++ b/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;
diff --git a/src/map/clif.c b/src/map/clif.c
index 2527ffebe..e24b3f7a1 100644
--- a/src/map/clif.c
+++ b/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
diff --git a/src/map/skill.c b/src/map/skill.c
index a849e55b2..90afdf01f 100644
--- a/src/map/skill.c
+++ b/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) {