aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellEffects.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index ac408381a83..051b4f1775c 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -2468,6 +2468,14 @@ void Spell::EffectPowerBurn(uint32 i)
Unit* caster = m_originalCaster ? m_originalCaster : m_caster;
+ // burn x% of target's mana, up to maximum of 2x% of caster's mana (Mana Burn)
+ if(m_spellInfo->ManaCostPercentage)
+ {
+ uint32 maxdamage = m_caster->GetMaxPower(powertype) * damage * 2 / 100;
+ damage = unitTarget->GetMaxPower(powertype) * damage / 100;
+ if(damage > maxdamage) damage = maxdamage;
+ }
+
int32 curPower = int32(unitTarget->GetPower(powertype));
uint32 power = damage;