From cbc841f05d525f25ad77b85e31cafe76c3518c60 Mon Sep 17 00:00:00 2001 From: breakwater Date: Sun, 7 Aug 2011 01:12:54 +0400 Subject: [PATCH] [11772] Some HandleAuraModIncreaseHealthPercent maximize health level at apply. Signed-off-by: VladimirMangos --- src/game/SpellAuras.cpp | 16 +++++++++++++++- src/shared/revision_nr.h | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 7ee78f763..92c57623f 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -5932,7 +5932,21 @@ void Aura::HandleAuraModIncreaseEnergyPercent(bool apply, bool /*Real*/) void Aura::HandleAuraModIncreaseHealthPercent(bool apply, bool /*Real*/) { - GetTarget()->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_PCT, float(m_modifier.m_amount), apply); + Unit *target = GetTarget(); + + target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_PCT, float(m_modifier.m_amount), apply); + + // spell special cases when current health set to max value at apply + switch (GetId()) + { + case 60430: // Molten Fury + case 64193: // Heartbreak + case 65737: // Heartbreak + target->SetHealth(target->GetMaxHealth()); + break; + default: + break; + } } void Aura::HandleAuraIncreaseBaseHealthPercent(bool apply, bool /*Real*/) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index c5edc8c6e..fb9ec5d2c 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11771" + #define REVISION_NR "11772" #endif // __REVISION_NR_H__