Jump to content

[possible fix ver. 2][8239]Shattered Barrier


Auntie Mangos

Recommended Posts

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

it should fix shattered barrier talent

For which repository revision was the patch created?

8064

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

http://getmangos.eu/community/showt...ttered+barrier

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

that would be me :)

The idea i get from pasdVn and his rapture patch :) thx

diff --git a/SpellAuras.cpp b/SpellAuras2.cpp
index 442da50..b04ff4e 100644
--- a/SpellAuras.cpp
+++ b/SpellAuras2.cpp
@@ -5779,6 +5779,27 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
            }
        }
    }
+    
+    if (!apply && caster &&
+        //Ice Barrier
+        m_spellProto->SpellFamilyName == SPELLFAMILY_MAGE && m_spellProto->Mechanic == MECHANIC_SHIELD &&
+        m_spellProto->SpellIconID == 32 &&
+        // completely absorbed or dispelled
+        ((m_removeMode == AURA_REMOVE_BY_DEFAULT && !m_modifier.m_amount) || m_removeMode == AURA_REMOVE_BY_DISPEL))
+    {
+        Unit::AuraList const& vDummyAuras = caster->GetAurasByType(SPELL_AURA_DUMMY);
+        for(Unit::AuraList::const_iterator itr = vDummyAuras.begin(); itr != vDummyAuras.end(); itr++)
+        {
+            SpellEntry const* vSpell = (*itr)->GetSpellProto();
+            
+            // Shattered Barrier
+            if(vSpell->SpellFamilyName == SPELLFAMILY_MAGE && vSpell->SpellIconID == 2945)
+            {
+                caster->CastSpell(caster, 55080, true);
+                break;
+            }
+        }
+    }
}

void Aura::PeriodicTick()

Link to comment
Share on other sites

  • 39 years later...

i didn't test your patch, because i use own in my compiled binaries and server. Thank you for finding a correct check of complete absorb (m_removeMode == AURA_REMOVE_BY_DEFAULT && !m_modifier.m_amount)

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 5808127..951b4f8 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -5702,6 +5702,23 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)

        m_modifier.m_amount += (int32)DoneActualBenefit;
    }
+    else
+        // Shattered Barrier
+        if (m_spellProto->SpellIconID == 32 && m_spellProto->SpellFamilyName == SPELLFAMILY_MAGE)
+        {
+            Unit* caster = GetCaster();
+            if (!((m_removeMode == AURA_REMOVE_BY_DEFAULT && !m_modifier.m_amount) || m_removeMode == AURA_REMOVE_BY_DISPEL))
+                return;
+
+            if (caster->HasAura(44745) && roll_chance_i(50))
+            {
+                caster->CastSpell(caster, 55080, true);
+            }
+            if (caster->HasAura(54787))
+            {
+                caster->CastSpell(caster, 55080, true);
+            }
+        }

    if (!apply && caster &&
        // Power Word: Shield

Link to comment
Share on other sites

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