aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2014-08-24 17:11:51 +0200
committerjackpoz <giacomopoz@gmail.com>2014-08-24 17:11:51 +0200
commita3b14db01522645edb56ec0e9a09d130a8162c8c (patch)
treee390a5288dee7d91bb6b729560311deb1d0d703f
parent42c230adabd3cdbc0b4d71ae2295edae20a3c008 (diff)
parent91827e87d181bab39308177f205dbedc7cc78a76 (diff)
Merge 'Numielle/master' into master
This is a workaround required by the current spell system limitations. Close pull request #11915 .
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index 16c2bd4b303..593ce9a54de 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -311,6 +311,13 @@ class spell_sha_earth_shield : public SpellScriptLoader
amount = caster->SpellHealingBonusDone(GetUnitOwner(), GetSpellInfo(), amount, HEAL);
amount = GetUnitOwner()->SpellHealingBonusTaken(caster, GetSpellInfo(), amount, HEAL);
+ //! WORKAROUND
+ // 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