diff options
author | Haru <haru@dotalux.com> | 2017-04-24 12:24:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-24 12:24:22 +0200 |
commit | ab31b1129b0015559137509e0c3099386f1a69ee (patch) | |
tree | 9bb7fbf77d41305b076ce796f66174fc14c04999 | |
parent | dfb5826427955033efd68097d4f7be33c930ed87 (diff) | |
parent | a477c105a6d5e60a55b71d3774e9658dcf96a670 (diff) | |
download | hercules-ab31b1129b0015559137509e0c3099386f1a69ee.tar.gz hercules-ab31b1129b0015559137509e0c3099386f1a69ee.tar.bz2 hercules-ab31b1129b0015559137509e0c3099386f1a69ee.tar.xz hercules-ab31b1129b0015559137509e0c3099386f1a69ee.zip |
Merge pull request #1704 from Jedzkie/13-AddHealRate
Added AB_HIGHNESSHEAL in skill_add_heal_rate configuration
-rw-r--r-- | conf/map/battle/skill.conf | 2 | ||||
-rw-r--r-- | src/map/pc.c | 38 |
2 files changed, 30 insertions, 10 deletions
diff --git a/conf/map/battle/skill.conf b/conf/map/battle/skill.conf index 8d7c9df44..b88c5d141 100644 --- a/conf/map/battle/skill.conf +++ b/conf/map/battle/skill.conf @@ -284,7 +284,7 @@ sg_miracle_skill_duration: 3600000 sg_angel_skill_ratio: 10 // Skills that bHealPower has effect on -// 1: Heal, 2: Sanctuary, 4: Potion Pitcher, 8: Slim Pitcher, 16: Apple of Idun +// 1: Heal, 2: Sanctuary, 4: Potion Pitcher, 8: Slim Pitcher, 16: Apple of Idun, 32: Highness Heal skill_add_heal_rate: 7 // Whether the damage of EarthQuake with a single target on screen is able to be reflected. diff --git a/src/map/pc.c b/src/map/pc.c index 2887942db..6da0bf035 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7612,22 +7612,42 @@ int pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) return bonus; } -int pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) { +int pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) +{ int i, bonus = sd->bonus.add_heal_rate; - if( bonus ) { - switch( skill_id ) { - case AL_HEAL: if( !(battle_config.skill_add_heal_rate&1) ) bonus = 0; break; - case PR_SANCTUARY: if( !(battle_config.skill_add_heal_rate&2) ) bonus = 0; break; - case AM_POTIONPITCHER: if( !(battle_config.skill_add_heal_rate&4) ) bonus = 0; break; - case CR_SLIMPITCHER: if( !(battle_config.skill_add_heal_rate&8) ) bonus = 0; break; - case BA_APPLEIDUN: if( !(battle_config.skill_add_heal_rate&16)) bonus = 0; break; + if (bonus) { + switch (skill_id) { + case AL_HEAL: + if ((battle_config.skill_add_heal_rate & 1) == 0) + bonus = 0; + break; + case PR_SANCTUARY: + if ((battle_config.skill_add_heal_rate & 2) == 0) + bonus = 0; + break; + case AM_POTIONPITCHER: + if ((battle_config.skill_add_heal_rate & 4) == 0) + bonus = 0; + break; + case CR_SLIMPITCHER: + if ((battle_config.skill_add_heal_rate & 8) == 0) + bonus = 0; + break; + case BA_APPLEIDUN: + if ((battle_config.skill_add_heal_rate & 16) == 0) + bonus = 0; + break; + case AB_HIGHNESSHEAL: + if ((battle_config.skill_add_heal_rate & 32) == 0) + bonus = 0; + break; } } ARR_FIND(0, ARRAYLENGTH(sd->skillheal), i, sd->skillheal[i].id == skill_id); - if( i < ARRAYLENGTH(sd->skillheal) ) + if (i < ARRAYLENGTH(sd->skillheal)) bonus += sd->skillheal[i].val; return bonus; |