Jump to content

[9541][patch] Riptide


pasdVn

Recommended Posts

Fixes the second effect of Riptide (Chain Heal Boost). We have to do this in Effect::Heal, because we have to access Spell::m_targets.

From 4ba89bd2ca23d2d47e2338893925259f2bf31403 Mon Sep 17 00:00:00 2001
From: pasdVn <[email protected]>
Date: Sat, 27 Feb 2010 11:27:25 +0100
Subject: [PATCH] Fixed Riptide Chain heal boost.

---
src/game/SpellEffects.cpp |   13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 14b478a..e5ee64e 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -2948,6 +2948,19 @@ void Spell::EffectHeal(SpellEffectIndex /*eff_idx*/)
            addhealth = caster->SpellHealingBonus(unitTarget, m_spellInfo, addhealth, HEAL);

        m_healing+=addhealth;
+
+        // Chain Healing
+        if (m_spellInfo->SpellFamilyName == SPELLFAMILY_SHAMAN && m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000000100))
+        {
+            // check for Riptide
+            if (unitTarget != m_targets.getUnitTarget())
+                return;
+            Aura* riptide = unitTarget->GetAura(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_SHAMAN, 0, 0x00000010, caster->GetGUID());
+            if (!riptide)            
+                return;
+            m_healing *= 1.25f;
+            unitTarget->RemoveAura(riptide);
+        }
    }
}

-- 
1.6.5.1.1367.gcd48

Link to comment
Share on other sites

Only the first chain heal target should benefit from this effect. My sollution to check this is via spell::m_targets, where the origninal client sended unit target is stored (this will also be the first chain heal target). Unfortunately m_targets is declared as private... Maybe we should write a method to access m_targets.unitTarget, but I did not want to do this for one strange spelleffect^^ Maybe there is also another sollution, to find out which one is the first chain target?

Link to comment
Share on other sites

×
×
  • 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