Jump to content

[Fix][8921] Guarded by The Light Script Effect


Guest nos4r2zod
 Share

Recommended Posts

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

This implements the script effect of Guarded by The Light that refreshes Divine Plea on the Paladin.

For which repository revision was the patch created?

8248

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

Didn't find any

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

Myself

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index bfa91b5..ec97e14 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -5134,6 +5134,18 @@ void Spell::EffectScriptEffect(uint32 effIndex)
                    }
                    return;
                }
+                // (Paladin spell with SPELLFAMILY_WARLOCK) - Guarded by The Light
+                case 63521:
+                {
+                    // Refresh Divine Plea on target (3 aura slots)
+                    Unit::AuraMap& dpAuras = unitTarget->GetAuras();
+                    for(Unit::AuraMap::iterator itr = dpAuras.begin(); itr != dpAuras.end(); ++itr)
+                    {
+                        if((*itr).second->GetId() == 54428)
+                           (*itr).second->RefreshAura();
+                    }
+                    return;
+                }
            }
            break;
        }

Some quick notes:

  • * Oddly, this spell has SPELLFAMILY_WARLOCK even though it's a Paladin spell
    * Not sure if there's a cleaner way to find Divine Plea's auras (perhaps it could be added to SpellMgr's IsSingleTargetSpell (via the same hack as Judgements) and found using m_scAuras? I think that would be marginally faster)
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 2 months later...
  • 1 month later...

Second effect doesn't work.

In addition, your Divine Plea spell is 100% less likely to be dispelled.

Confirm in:

MaNGOS/0.15.0 (* * Revision 9110 - *) for Linux_x64 (little-endian)

Using script library: ScriptDev2 (for MaNGOS 9062+) Revision [1539] 2010-01-04 02:13:08 (Unix)

Using World DB: PSDB WotLK (279)

Using creature EventAI: PSDB EventAI & ACID 3.0.0

Link to comment
Share on other sites

 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