diff options
| author | megamage <none@none> | 2009-06-17 18:35:40 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-06-17 18:35:40 -0500 |
| commit | a2f10c496fcacbfd3dcb976807c8c23012aba03d (patch) | |
| tree | cdc8a358411fcfe4199b1a3628735d763e31103b /src/game/SpellAuras.cpp | |
| parent | 7e4fcb17934bfd37a771334e36131ea402559d9b (diff) | |
[8030] Fixed spell 64901 work and related target selection code refactoring. Author: VladimirMangos
* Replace 64904 by 64901 in spellbook and action bars.
* Implement proper max mana percent buff
* Implement proper target selection.
* Move group/raid targets seelction code to functions for reuse code.
--HG--
branch : trunk
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); } |
