Jump to content

[Patch][8922] Unrelenting Assault


Guest xXxRRLxXx

Recommended Posts

What repair this patch: Apply Debuff "Unrelenting Assault" when Overpower hit a caster (Casting healing or Damage Spell). Reduces 25/50% damage or heal for 6 seconds.

Autor of this patch: QAston from Trinity

Unrelenting Assault

http://www.wowhead.com/?spell=46860

http://www.wowhead.com/?spell=46859

diff --git a/src/game/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -2109,6 +2109,29 @@ void Aura::HandleAuraDummy(bool ap
    // AT APPLY
    if(apply)
    {
+        // Overpower
+        if (caster && m_spellProto->SpellFamilyName == SPELLFAMILY_WARRIOR && 
+            m_spellProto->SpellFamilyFlags[0] & 0x4)
+        {
+            // Must be casting target
+            if (!m_target->IsNonMeleeSpellCasted(false))
+                return;
+            if (AuraEffect * aurEff = caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_WARRIOR, 2775, 0))
+            {
+                switch (aurEff->GetId())
+                {
+                    // Unrelenting Assault, rank 1
+                    case 46859:
+                        caster->CastSpell(m_target,64849,true,NULL,aurEff);
+                        break;
+                    // Unrelenting Assault, rank 2
+                    case 46860:
+                        caster->CastSpell(m_target,64850,true,NULL,aurEff);
+                        break;
+                }
+            }
+            return;
+        }
        switch(GetId())
        {

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...

No compiling:

../../../src/game/SpellAuras.cpp: In member function ‘void Aura::HandleAuraDummy(bool, bool)’:

../../../src/game/SpellAuras.cpp:2238: error: ‘caster’ was not declared in this scope

../../../src/game/SpellAuras.cpp:2240: error: invalid types ‘const uint64[int]’ for array subscript

../../../src/game/SpellAuras.cpp:2250: error: ‘AuraEffect’ was not declared in this scope

../../../src/game/SpellAuras.cpp:2250: error: ‘aurEff’ was not declared in this scope

../../../src/game/SpellAuras.cpp:2250: error: ‘caster’ was not declared in this scope

Link to comment
Share on other sites

1 error fixed, thx!

../../../src/game/SpellAuras.cpp: In member function ‘void Aura::HandleAuraDummy(bool, bool)’:
../../../src/game/SpellAuras.cpp:2240: error: invalid types ‘const uint64[int]’ for array subscript
../../../src/game/SpellAuras.cpp:2250: error: ‘AuraEffect’ was not declared in this scope
../../../src/game/SpellAuras.cpp:2250: error: ‘aurEff’ was not declared in this scope
../../../src/game/SpellAuras.cpp:2250: error: ‘class Unit’ has no member named ‘GetAuraEffect’

Link to comment
Share on other sites

It's bad... i think you should try similar but still working patch

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 906a197..d505322 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1360,6 +1360,35 @@ void Spell::EffectDummy(uint32 i)
                m_damage+= uint32(damage * m_caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
                return;
            }
+            // Overpower
+            if(m_spellInfo->SpellFamilyFlags & 0x4)
+            {
+                // Must be casting target
+                if (!unitTarget->IsNonMeleeSpellCasted(false))
+                    return;
+                // Find Unrelenting Assault
+                Unit::AuraList const& modifierAuras = m_caster->GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
+                for(Unit::AuraList::const_iterator itr = modifierAuras.begin(); itr != modifierAuras.end(); ++itr)
+                {
+                    if((*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARRIOR && (*itr)->GetSpellProto()->SpellIconID == 2775)
+                    {
+                        switch ((*itr)->GetSpellProto()->Id)
+                        {
+                            // Unrelenting Assault, rank 1
+                            case 46859:
+                                m_caster->CastSpell(unitTarget,64849,true,0,(*itr));
+                                break;
+                            // Unrelenting Assault, rank 2
+                            case 46860:
+                                m_caster->CastSpell(unitTarget,64850,true,0,(*itr));
+                                break;
+                            default:
+                                break;
+                        }
+                    }
+                }
+                return;
+            }
            switch(m_spellInfo->Id)
            {
                // Warrior's Wrath

Link to comment
Share on other sites

It's bad... i think you should try similar but still working patch

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 906a197..d505322 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1360,6 +1360,35 @@ void Spell::EffectDummy(uint32 i)
                m_damage+= uint32(damage * m_caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
                return;
            }
+            // Overpower
+            if(m_spellInfo->SpellFamilyFlags & 0x4)
+            {
+                // Must be casting target
+                if (!unitTarget->IsNonMeleeSpellCasted(false))
+                    return;
+                // Find Unrelenting Assault
+                Unit::AuraList const& modifierAuras = m_caster->GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
+                for(Unit::AuraList::const_iterator itr = modifierAuras.begin(); itr != modifierAuras.end(); ++itr)
+                {
+                    if((*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARRIOR && (*itr)->GetSpellProto()->SpellIconID == 2775)
+                    {
+                        switch ((*itr)->GetSpellProto()->Id)
+                        {
+                            // Unrelenting Assault, rank 1
+                            case 46859:
+                                m_caster->CastSpell(unitTarget,64849,true,0,(*itr));
+                                break;
+                            // Unrelenting Assault, rank 2
+                            case 46860:
+                                m_caster->CastSpell(unitTarget,64850,true,0,(*itr));
+                                break;
+                            default:
+                                break;
+                        }
+                    }
+                }
+                return;
+            }
            switch(m_spellInfo->Id)
            {
                // Warrior's Wrath

Compiled. I'll give you feedback (mangos 8905).

Thx.

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