Jump to content

[patch]Remove Immunity Effect for Shattering Throw


Guest NetSky

Recommended Posts

for making warbringer and juggernaut finally work

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index ff6d791..a25b38d 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1011,13 +1011,18 @@ void Aura::_AddAura()
        }
    }

-    if (IsNeedVisibleSlot(caster))
+    // Test hack of set slot and aura update of Warbringer and Juggernaut 
+    if (IsNeedVisibleSlot(caster) || ((m_spellProto->Id == 57499 || m_spellProto->Id == 64976) && m_spellProto->EffectApplyAuraName[GetEffIndex()] == SPELL_AURA_262))
    {
        SetAuraSlot( slot );
        if(slot < MAX_AURAS)                        // slot found send data to client
        {
            SetAura(false);
-            SetAuraFlags((1 << GetEffIndex()) | AFLAG_NOT_CASTER | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE) | (IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE));
+            // Send new auraFlags 
+            if ((m_spellProto->Id == 57499 || m_spellProto->Id == 64976) && m_spellProto->EffectApplyAuraName[GetEffIndex()] == SPELL_AURA_262) 
+                SetAuraFlags((7) | AFLAG_NOT_CASTER | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE) | (IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE)); 
+            else 
+                SetAuraFlags((1 << GetEffIndex()) | AFLAG_NOT_CASTER | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE) | (IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE));
            SetAuraLevel(caster ? caster->getLevel() : sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL));
            SendAuraUpdate(false);
        }

Author: MaS0n from getmangos.ru

Link to comment
Share on other sites

maybe something is at wrong place or you got to add ignore immunity for triggered spell but for me it worked without this

try on clean mangos core with many patches applied it can happen that some parts were added at wrong places - note this is acutally written for rev 85xx

Link to comment
Share on other sites

Retested on a clean mangos core.

Does not remove http://www.wowhead.com/?spell=642

It does remove http://www.wowhead.com/?spell=498

I don't think RemoveAurasDueToMechanic is the best way to deal with this spell.

You might think so, but I guess that reality is more like something that MaNGOS do not let that spell ignore immunity

I'm sure that as far as 3.1.3 spell DBC it worked fine

Link to comment
Share on other sites

  • 2 weeks later...
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index ff6d791..a25b38d 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1011,13 +1011,18 @@ void Aura::_AddAura()
        }
    }

-    if (IsNeedVisibleSlot(caster))
+    // Test hack of set slot and aura update of Warbringer and Juggernaut 
+    if (IsNeedVisibleSlot(caster) || ((m_spellProto->Id == 57499 || m_spellProto->Id == 64976) && m_spellProto->EffectApplyAuraName[GetEffIndex()] == SPELL_AURA_262))
    {
        SetAuraSlot( slot );
        if(slot < MAX_AURAS)                        // slot found send data to client
        {
            SetAura(false);
-            SetAuraFlags((1 << GetEffIndex()) | AFLAG_NOT_CASTER | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE) | (IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE));
+            // Send new auraFlags 
+            if ((m_spellProto->Id == 57499 || m_spellProto->Id == 64976) && m_spellProto->EffectApplyAuraName[GetEffIndex()] == SPELL_AURA_262) 
+                SetAuraFlags((7) | AFLAG_NOT_CASTER | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE) | (IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE)); 
+            else 
+                SetAuraFlags((1 << GetEffIndex()) | AFLAG_NOT_CASTER | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE) | (IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE));
            SetAuraLevel(caster ? caster->getLevel() : sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL));
            SendAuraUpdate(false);
        }

Author: MaS0n from getmangos.ru

work for me:)

Link to comment
Share on other sites

Patch for Shattering throw doesn't work anymore. Spell 64380 can't remove immunity effects from target and spell 64382 does too small damage (i think second problem should be fixed by other way)

tested on 8780 rev

In file spelleffects.cpp

First can be fixed by replacing

unitTarget->RemoveAurasDueToMechanic(1<<MECHANIC_IMMUNE_SHIELD);

to

unitTarget->RemoveAurasDueToMechanic(1<<(MECHANIC_IMMUNE_SHIELD-1));

Second by add

                // Shattering Throw ${$m1+$AP*.50}
               else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0040000000000000))
                   damage+= uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.5f);

under

                // Heroic Throw ${$m1+$AP*.50}
               else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000100000000))
                   damage+= uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.5f);

Working patch is here http://paste2.org/p/503679

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
Fixed in hackish form in my repo, but you need to use both patches (17 and this) or apply it manually http://github.com/insider42/mangos/commit/3851daef08ccf708ddc87f0e30c0ee55c15a35cc

anyway spell won't remove immunities if you add precast spell. I just allowed spell 64382 to remove immunity effects and it works.

Hackish bug 70% good :) It removes Divine Shield & Hand of Protection rank 1,2,3 but doesn't remove the Ice Block from mage. Any ideea?

Link to comment
Share on other sites

×
×
  • 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