Jump to content

[Feature][8512] support Glyph of Power Word: Shield


Guest Trazom

Recommended Posts

What features does the patch add?

supports the heal bonus given by the Glyph of Power Word: Shield (20% of damage taken)

link: http://www.wowhead.com/?item=42408

For which repository revision was the patch created?

master [7635]

Is there a thread in the bug report section or at lighthouse?

None I know

Who has been writing this patch?

Myself

The glyph adds an aura with amount=20 and misc value 23. The implementation checks this misc value. and heals the amount (%) of damage absorbed

Revision 1 (8 April):

- use spell 56160

- instant heal when PW:S is cast on target.

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

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index c60809e..1d4a35c 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -5651,6 +5651,37 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
            DoneActualBenefit *= caster->CalculateLevelPenalty(GetSpellProto());

            m_modifier.m_amount += (int32)DoneActualBenefit;
+
+            // now that the correct amount is computed, apply caster aura, if any
+            switch(m_spellProto->SpellFamilyName)
+            {
+                case SPELLFAMILY_PRIEST:
+                    if (m_spellProto->SpellFamilyFlags == 0x1) //PW:S
+                    {
+                        Unit::AuraList const& vOverRideCS = caster->GetAurasByType(SPELL_AURA_DUMMY);
+                        for(Unit::AuraList::const_iterator k = vOverRideCS.begin(); k != vOverRideCS.end(); ++k)
+                        {
+                            switch((*k)->GetModifier()->m_miscvalue)
+                            {
+                                case 23: // Glyph: PW:S
+                                    // instant heal glyph m_amount% of the absorbed amount
+                                    int32 heal;
+
+                                    heal = ((*k)->GetModifier()->m_amount * m_modifier.m_amount)/100;
+                                    caster->CastCustomSpell(m_target, 56160, &heal, NULL, NULL, true, 0, this);
+                                    break;
+                                default: 
+                                    break;
+                            }
+                        }
+
+
+                        break;
+                    }
+                    break;
+                default:
+                    break;
+            }
        }
    }
}
-- 

Link to comment
Share on other sites

It gets mentioned about 5 times on the linked wowhead page that it's an instant heal, and is again clarified that health is not funneled while damage is absorbed. Also the heal can crit according to the comments...so apparently "simply" a secondary spell casted when you cast a Power Word:Shield on someone.

But i don't have any first hand experience either...

Link to comment
Share on other sites

  • 5 months 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