Jump to content

[9108]Succubus


Recommended Posts

Posted

Confirm. Some days ago i tried to fix it, but my knowledge not enough.

We must add check in

Spell::update
aura requirements for interrupt channeling spells, and if effects of channeling spell is gone -> interrupt casting.

I thing

IsAliveUnitPresentInTargetList
is the best place.
Posted

My idea was to do it somehow like this

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 611f608..209952a 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -2803,7 +2803,13 @@ void Spell::update(uint32 difftime)
        else if(!IsNextMeleeSwingSpell() && !IsAutoRepeat() && !m_IsTriggeredSpell && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_MOVEMENT))
            cancel();
    }
-
+    // check if spell aura on target does not exist anymore (for channeled spells)
+    if ( m_spellState == SPELL_STATE_CASTING && IsChanneledSpell(m_spellInfo) && m_spellInfo->AuraInterruptFlags != 0)
+    {
+        Unit *target = m_targets.getUnitTarget();
+        if ( !target->HasAura(m_spellInfo->Id) )
+            cancel();
+    }
    switch(m_spellState)
    {
        case SPELL_STATE_PREPARING:

but I am not sure if it does not affect any other spells in a negative way:(:(:/

Posted

Tested 2 days. Not found any negative influence.

I moved this in more correct place (as i think) :)

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index c0c5bbe..bbffdf8 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1291,7 +1291,15 @@ bool Spell::IsAliveUnitPresentInTargetList()

            // either unit is alive and normal spell, or unit dead and deathonly-spell
            if (unit && (unit->isAlive() != IsDeathOnlySpell(m_spellInfo)))
+            {  
                needAliveTargetMask &= ~ihit->effectMask;   // remove from need alive mask effect that have alive target
+                // check if spell aura on target does not exist anymore (for channeled spells)
+                if (IsChanneledSpell(m_spellInfo) && m_spellInfo->AuraInterruptFlags != 0)
+                {
+                    if ( !unit->HasAura(m_spellInfo->Id) )
+                       return false;
+                }
+            }
        }
    }

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