Jump to content

[9298][PATCH]Healing Stream Totem


Guest [D4RK]Doom-Lord

Recommended Posts

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

For which repository revision was the patch created?

9292.

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

https://mangos.lighthouseapp.com/projects/18208/tickets/218-shaman-healing-stream-totem

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

[D4RK]Doom-Lord

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index f9b7926..ed8f188 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1918,7 +1918,23 @@ void Spell::EffectDummy(uint32 i)
            if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000002000))
            {
                if (unitTarget)
+                {
+                    if (Unit *owner = m_caster->GetOwner())
+                    damage += int32(owner->SpellBaseHealingBonus(GetSpellSchoolMask(m_spellInfo)) * 0.045f);
+                    // Restorative Totems (Healing Stream Totem)
+                    if (Unit *owner = m_caster->GetOwner())
+                    {
+                        Unit::AuraList const& mDummyAuras = owner->GetAurasByType(SPELL_AURA_DUMMY);
+                        for(Unit::AuraList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
+                            if (((*i)->GetId() == 16187) || ((*i)->GetId() == 16205) || ((*i)->GetId() == 16206) )
+                            damage+=(*i)->GetModifier()->m_amount * damage / 100;
+                    }    
+                    // Glyph Healing Stream Totem
+                    if (Unit *owner = m_caster->GetOwner())
+                        if (Aura *dummy = owner->GetDummyAura(55456))
+                            damage+=dummy->GetModifier()->m_amount * damage / 100;
                    m_caster->CastCustomSpell(unitTarget, 52042, &damage, 0, 0, true, 0, 0, m_originalCasterGUID);
+                }
                return;
            }
            // Mana Spring Totem

Link to comment
Share on other sites

From

uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack)

It gets in:

if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE)
   {
       healamount = healamount * TakenTotalMod;
       return healamount < 0 ? 0 : uint32(healamount);
   }

and never reach this line:

SpellBonusEntry const* bonus = sSpellMgr.GetSpellBonusData(spellProto->Id);

Link to comment
Share on other sites

I've followed code and from effect 10:

void Spell::EffectHeal( uint32 /*i*/ )

it calls

addhealth = caster->SpellHealingBonus(unitTarget, m_spellInfo, addhealth, HEAL);

SpellHealingBonus function is a recursive one in case of totem, so it's called twice first for totem and next for owner. Healing stream has "DmgClass == SPELL_DAMAGE_CLASS_NONE" so in "that if" it returns the second call to first call. I've tested it with checks and never call "SpellBaseHealingBonus()" function.

Link to comment
Share on other sites

  • 3 weeks later...

As it was already mentioned the problem is, that the heal spell has SPELL_DAMAGE_CLASS_NONE. It would need some bigger changes in the bonus calculation logic to solve this problem clean (I think the original periodic trigger aura should receive the spell bonus, and cast the dummy aura with value...). SQL does not help here^^

Link to comment
Share on other sites

  • 10 months later...
  • 2 weeks later...
×
×
  • 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