Jump to content

[patch] Glyph of thorns, Glyph of Blessing of Wisdom, Glyph of Blessing of Might


Auntie Mangos

Recommended Posts

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

Increase the Duration from Thorns (Rank 1) - Thorns (Rank 8) with Glyph of Thorns

Increase the Duration from Blessing of Might (Rank 1) - Blessing of Might (Rank 10) with Glyph of Blessing of Might

Increase the Duration from Blessing of Wisdom (Rank 1) - Blessing of Wisdom (Rank 9) with Glyph of Blessing of Wisdom

For which repository revision was the patch created?

10051

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/504

https://mangos.lighthouseapp.com/projects/18208/tickets/503

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

me and kyle1

[bUG + FIX] Glyph of Thorns

http://paste2.org/p/879791<- the alteration of the source code

Thanks at kyle1

How patched Glyph of Shadow Protection?

pls test and comment

Link to comment
Share on other sites

Right after I made that patch I found that NetSky did it in more elegant way in more appropriate place: link. Look, no enumerations, no hardcoded values, clean and beautiful.

Here is his work updated to latest revision [10064], haven't tested work though, just compilation:

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 22d0767..9b98432 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -11481,6 +11481,37 @@
    else
        duration = minduration;

+        if (unitPlayer && target == this)
+        {
+            switch(spellProto->SpellFamilyName)
+            {
+                case SPELLFAMILY_DRUID:
+                    if (spellProto->SpellFamilyFlags & UI64LIT(0x100))
+                    {
+                        // Glyph of Thorns
+                        if (Aura *aur = GetAura(57862, EFFECT_INDEX_0))
+                            duration += aur->GetModifier()->m_amount * MINUTE * IN_MILLISECONDS;
+                    }
+                    break;
+                case SPELLFAMILY_PALADIN:
+                    if (spellProto->SpellIconID == 298 && spellProto->SpellFamilyFlags & UI64LIT(0x00000002))
+                    {
+                        // Glyph of Blessing of Might
+                        if (Aura *aur = GetAura(57958, EFFECT_INDEX_0))
+                            duration += aur->GetModifier()->m_amount * MINUTE * IN_MILLISECONDS;
+                    }
+                    else if (spellProto->SpellIconID == 306 && spellProto->SpellFamilyFlags & UI64LIT(0x00010000))
+                    {
+                        // Glyph of Blessing of Wisdom
+                        if (Aura *aur = GetAura(57979, EFFECT_INDEX_0))
+                            duration += aur->GetModifier()->m_amount * MINUTE * IN_MILLISECONDS;
+                    }
+                    break;
+                default:
+                    break;
+            }
+        }
+
    if (duration > 0)
    {
        int32 mechanic = GetEffectMechanic(spellProto, effect_index);
@@ -13751,4 +13782,4 @@

    ++m_castCounter;
    return true;
-}
\\ No newline at end of file
+}

Link to comment
Share on other sites

  • 40 years later...
Guest
This topic is now closed to further replies.
×
×
  • 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