Jump to content

[11772] Addition in Aura::HandleAuraModIncreaseEnergyPercent


Guest breakwater
 Share

Recommended Posts

What bug does the patch fix? What features does the patch add?

Set Health to max for some Spell's with increase HealthPercent

For which repository revision was the patch created?

my revision is 11708, but this fix is also for newer and older revisions

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

I don't know

Who has been writing this patch? Please include either forum user names or email addresses.

me

Maybe we find other spells.

Examples: 56257, 59911, 60430

But i don't use this spells

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 5e01875..7e5905c 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -6582,7 +6582,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();
+
+    if (!target)
+        return;
+
+    target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_PCT, float(m_modifier.m_amount), apply);
+    switch (GetId())
+    {
+        case 64193:                                 // Heartbreak (Ulduar - XT-002)
+        case 65737:
+            target->SetHealth(target->GetMaxHealth());
+            break;
+        default:
+            break;
+    }
}

void Aura::HandleAuraIncreaseBaseHealthPercent(bool apply, bool /*Real*/)

EDIT: I have add this Spell 64582

Link to comment
Share on other sites

hmm, but if current health < max case? instant full health heal, is this expected?

Yes, this is expected, but is should be noted that both of the spells (64193 and 65737) have script "Script Effect

Value: 100". Maybe the healing effect is set through this effect.

Link to comment
Share on other sites

  • 2 weeks later...
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use