diff options
author | Haru <haru@dotalux.com> | 2014-08-02 20:58:22 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-08-02 21:04:06 +0200 |
commit | b791b665c87589548c9c57afbe0fe50ec7c32676 (patch) | |
tree | c356cb0d145e68c9ca5912a2aa0ba55fb9790a09 /src/map/skill.c | |
parent | 3961c4cba6e4686d0babb59be917b971479f7780 (diff) | |
download | hercules-b791b665c87589548c9c57afbe0fe50ec7c32676.tar.gz hercules-b791b665c87589548c9c57afbe0fe50ec7c32676.tar.bz2 hercules-b791b665c87589548c9c57afbe0fe50ec7c32676.tar.xz hercules-b791b665c87589548c9c57afbe0fe50ec7c32676.zip |
Fixed several issues with SO_EL_SYMPATHY
- Corrected an issue that caused the elemental's HP and SP would
_decrease to_ summon_level*5% instead of _increasing by_ said amount.
- Corrected an issue that decreased the SP cost of summon elemental
skills by 5% even when the Spirit Sympathy skill wasn't present.
- Added/renamed some variables to prevent confusion. Please don't reuse
'i' variables for things that aren't array indices. Or don't reuse
variables altogether for different purposes than their original one.
- Special thanks to Kisuka.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index c744dbde4..e16cb0cc7 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -14043,7 +14043,11 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16 case SO_SUMMON_AQUA: case SO_SUMMON_VENTUS: case SO_SUMMON_TERA: - req.sp -= req.sp * (5 + 5 * pc->checkskill(sd,SO_EL_SYMPATHY)) / 100; + { + int spirit_sympathy = pc->checkskill(sd,SO_EL_SYMPATHY); + if (spirit_sympathy) + req.sp -= req.sp * (5 + 5 * spirit_sympathy) / 100; + } break; case SO_PSYCHIC_WAVE: if( sc && (sc->data[SC_HEATER_OPTION] || sc->data[SC_COOLER_OPTION] || sc->data[SC_BLAST_OPTION] || sc->data[SC_CURSED_SOIL_OPTION] )) |