diff options
| author | Trazom62 <none@none> | 2010-04-03 08:22:04 +0200 |
|---|---|---|
| committer | Trazom62 <none@none> | 2010-04-03 08:22:04 +0200 |
| commit | c6b86026195e027af32c866c69a6382b3fb19d00 (patch) | |
| tree | 2cd4bb09a78458f3a14556a2a44466d1322969c1 /src | |
| parent | 6dedf65e3ee2c59ac299ba39d0b2c624e2d65f1d (diff) | |
Fix Hymn of Hope. Thanks Proof.
Fixes issue #1322.
Fixes issue #1428.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/SpellAuraEffects.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/SpellAuraEffects.cpp b/src/game/SpellAuraEffects.cpp index d12817eaef2..3adfe15d746 100644 --- a/src/game/SpellAuraEffects.cpp +++ b/src/game/SpellAuraEffects.cpp @@ -4679,8 +4679,13 @@ void AuraEffect::HandleAuraModIncreaseEnergy(AuraApplication const * aurApp, uin // Special case with temporary increase max/current power (percent) if (GetId()==64904) // Hymn of Hope { - if(mode & AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK) - target->SetPower(powerType, apply ? GetAmount() + target->GetPower(powerType) : target->GetPower(powerType) - GetAmount()); + if (mode & AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK) + { + int32 change = target->GetPower(powerType) + (apply ? GetAmount() : -GetAmount()); + if (change < 0) + change = 0; + target->SetPower(powerType, change); + } } // generic flat case |
