mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[7606] Fix use % power burn in effects
Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
fd26dbccda
commit
6c6703f363
2 changed files with 9 additions and 1 deletions
|
|
@ -2392,6 +2392,14 @@ void Spell::EffectPowerBurn(uint32 i)
|
||||||
if(damage < 0)
|
if(damage < 0)
|
||||||
return;
|
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));
|
int32 curPower = int32(unitTarget->GetPower(powertype));
|
||||||
|
|
||||||
// resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)
|
// resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7605"
|
#define REVISION_NR "7606"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue