Merge 'Numielle/master' into master

This is a workaround required by the current spell system limitations.
Close pull request #11915 .
This commit is contained in:
jackpoz committed 2014-08-24 17:11:51 +02:00
commit a3b14db015
1 file changed
+7
@@ -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