From a3832be8d656c92a4c2104527425d150a859b511 Mon Sep 17 00:00:00 2001 From: ariel- Date: Sun, 2 Oct 2016 00:24:47 -0300 Subject: Core/Spells: Implemented SPELL_ATTR6_NOT_RESET_SWING_IF_INSTANT. Closes #1765 (cherry picked from commit 03e21d2fad3b174f6e813f114f2828d9d9b510bb) --- src/server/game/Spells/Spell.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/server/game/Spells/Spell.cpp') diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 02d7a25a202..7b2a71d9caf 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3700,6 +3700,7 @@ void Spell::finish(bool ok) break; } } + if (!found && !m_spellInfo->HasAttribute(SPELL_ATTR2_NOT_RESET_AUTO_ACTIONS)) { m_caster->resetAttackTimer(BASE_ATTACK); @@ -6791,7 +6792,13 @@ bool Spell::IsNextMeleeSwingSpell() const bool Spell::IsAutoActionResetSpell() const { /// @todo changed SPELL_INTERRUPT_FLAG_AUTOATTACK -> SPELL_INTERRUPT_FLAG_INTERRUPT to fix compile - is this check correct at all? - return !IsTriggered() && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_INTERRUPT); + if (IsTriggered() || !(m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_INTERRUPT)) + return false; + + if (!m_casttime && m_spellInfo->HasAttribute(SPELL_ATTR6_NOT_RESET_SWING_IF_INSTANT)) + return false; + + return true; } bool Spell::IsNeedSendToClient() const -- cgit v1.2.3