diff options
Diffstat (limited to 'src/game/SpellAuras.cpp')
| -rw-r--r-- | src/game/SpellAuras.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index d55510b47ff..e33fa8a5b9d 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -5137,6 +5137,19 @@ void AuraEffect::HandleAuraModIncreaseEnergy(bool apply, bool Real, bool /*chang UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + powerType); + // Special case with temporary increase max/current power (percent) + if (GetId()==64904) // Hymn of Hope + { + if(Real) + { + uint32 val = m_target->GetPower(powerType); + m_target->HandleStatModifier(unitMod, TOTAL_PCT, float(m_amount), apply); + m_target->SetPower(powerType, apply ? val*(100+m_amount)/100 : val*100/(100+m_amount)); + } + return; + } + + // generic flat case m_target->HandleStatModifier(unitMod, TOTAL_VALUE, float(m_amount), apply); } |
