summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-26 14:44:38 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-26 14:44:38 +0000
commitbab077c56d3f89cc65bb0b00e10046ae8bdaa83a (patch)
treedd50254304bbbb538ae0f38e477e4591a8e0a9f1 /src/map
parent0fcfb97f9aab16e782440a9f785dba45e89213d4 (diff)
downloadhercules-bab077c56d3f89cc65bb0b00e10046ae8bdaa83a.tar.gz
hercules-bab077c56d3f89cc65bb0b00e10046ae8bdaa83a.tar.bz2
hercules-bab077c56d3f89cc65bb0b00e10046ae8bdaa83a.tar.xz
hercules-bab077c56d3f89cc65bb0b00e10046ae8bdaa83a.zip
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7343 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-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
4 files changed, 18 insertions, 24 deletions
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) {