diff options
| author | Numielle <numielle@web.de> | 2014-04-20 23:48:57 +0200 |
|---|---|---|
| committer | Numielle <numielle@web.de> | 2014-04-20 23:48:57 +0200 |
| commit | 91827e87d181bab39308177f205dbedc7cc78a76 (patch) | |
| tree | 64f39c903a465bb6ae2509b2285681770b16f893 /src | |
| parent | 574fa30ea6924902af1d845e667f38c043b32e94 (diff) | |
Core/Spells: Fixed double heal reduction on Eart Shield (issue #4032).
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 707c8a0985f..a199569401d 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -310,6 +310,12 @@ class spell_sha_earth_shield : public SpellScriptLoader amount = caster->SpellHealingBonusDone(GetUnitOwner(), GetSpellInfo(), amount, HEAL); amount = GetUnitOwner()->SpellHealingBonusTaken(caster, GetSpellInfo(), amount, HEAL); + // If target is affected by healing reduction, modifier is guaranteed to be negative + // value (e.g. -50). To revert the effect, multiply amount with reciprocal of relative value: + // (100 / ((-1) * modifier)) * 100 = (-1) * 100 * 100 / modifier = -10000 / modifier + if (int32 modifier = GetUnitOwner()->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT)) + ApplyPct(amount, -10000.0f / float(modifier)); + // Glyph of Earth Shield //! WORKAROUND //! this glyph is a proc |
