Jump to content

[Patch][9030] Arcane damaging spells remove Arcane Blast debuff


Guest Maxxie

Recommended Posts

A most welcome improvement, though not quite official. The debuff should be removed upon casting any damage arcane spell. As it is, the patch removes the debuff when an arcane spell does damage rather than when the arcane spell is actually cast.

This also brings to my attention that the debuff doesn't appear to be stacking properly. I'm new to the project and haven't yet delved in to the code that brings spells and buffs to life, so I don't know whether there's a fundamental reason for that to remain unimplemented.

Link to comment
Share on other sites

As I said I don't know my way around this code yet, but this seems more appropriate.

---
src/game/Spell.cpp |    4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 4eb296c..9ade160 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -2415,6 +2415,10 @@ void Spell::cast(bool skipCheck)
        {
            if (m_spellInfo->SpellFamilyFlags&0x0000008000000000LL)    // Ice Block
                m_preCastSpell = 41425;                                // Hypothermia
+            else if(m_spellInfo->SchoolMask & SPELL_SCHOOL_MASK_ARCANE)
+            {
+                m_caster->RemoveAurasDueToSpell(36032);
+            }
            break;
        }
        case SPELLFAMILY_PRIEST:
--

Link to comment
Share on other sites

Trouble is that mangos (incorrectly) calculates spell damage (including bonuses) when damage is dealt. Therefore of you remove arcane blast aura on spellcast, spells with travel time (a.barrage, a.missiles) will not benefit from it at all. If you remove aura on when spell deals damage, only first missile of arcane missiles spell will get the bonus.

I think first damage calculation of spells need to be changed so all modifiers from caster are taken at spell cast.

Link to comment
Share on other sites

  • 8 months later...
  • 2 months later...

why not something like this?

@@ -6022,10 +6022,22 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
                    }
                }
                else
                    return;
            }
+            else if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000800)) // Arcane Missile
+            {
+                if (!apply && (m_removeMode == AURA_REMOVE_BY_DEFAULT))
+                {            
+                    if (Unit* caster = GetCaster())
+                        caster->RemoveAurasDueToSpell(36032); // Arcane Blast debuff
+                    else
+                        return;
+                }
+                else
+                    return;
+            }

            switch(GetId())
            {
                case 11129:                                 // Combustion (remove triggered aura stack)
                {

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