Jump to content

[11035] Glyph's - Thorns, Blessing of Might/Wisdom, Horn of Winter


Recommended Posts

Posted

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) (Spellid=19742) - Blessing of Wisdom (Rank 9) (Spellid=48936) with Glyph of Blessing of Wisdom

For which repository revision was the patch created?

11009

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

outdated Patches:

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

me, source from breakwater and kyle1 /// Netsky (See outdated Patches)

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 38b78c1..4bcdc9b 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -8806,6 +8806,37 @@ int32 Unit::CalculateSpellDuration(SpellEntry const* spellProto, SpellEffectInde
    else
        duration = minduration;

+    if (unitPlayer && target == this)            // Adding Support for future durationchanges in glyphs see outdated patches
+    {
+        switch(spellProto->SpellFamilyName)
+        {
+        case SPELLFAMILY_DRUID:
+            if (spellProto->SpellFamilyFlags & UI64LIT(0x100)) // DurationIndex prevent Greater Blessing (Group)
+            {
+                // 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->DurationIndex == 6 && 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);

Something wrong with this patch or is there a proper way needed?

  • 40 years later...
  • 1 month later...
  • 2 weeks later...
Posted

Rewrote Description and Title will be also changed when fixxed forum issue ;)

Patch Updated for latest rev. 11009, removed Horn of Winter - Glyph

Is this way to change the duration too hacky?

Is there a proper way needed for this patch?

Posted
Is this way to change the duration too hacky?
I not see any related spells or spell mods so possible good way

I recheck this currently for be sure

Maybe only need apply glyph mods as final duration addition

[added]

In [11035]. Thank you :)

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