[7606] Fix use % power burn in effects

Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
Lutik 2009-04-03 02:14:50 +04:00 committed by DiSlord
parent fd26dbccda
commit 6c6703f363
2 changed files with 9 additions and 1 deletions

View file

@ -2392,6 +2392,14 @@ void Spell::EffectPowerBurn(uint32 i)
if(damage < 0)
return;
// 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));
// resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7605"
#define REVISION_NR "7606"
#endif // __REVISION_NR_H__