diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2016-10-02 00:24:47 -0300 |
|---|---|---|
| committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-03-04 20:03:54 +0100 |
| commit | a3832be8d656c92a4c2104527425d150a859b511 (patch) | |
| tree | eb6b057a3c95b327c8e36c52ce117d0715e359f2 /src/server/game/Spells/Spell.cpp | |
| parent | c0667acbe1a229be9cb9e344190c2d6e62bd54bd (diff) | |
Core/Spells: Implemented SPELL_ATTR6_NOT_RESET_SWING_IF_INSTANT.
Closes #1765
(cherry picked from commit 03e21d2fad3b174f6e813f114f2828d9d9b510bb)
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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 |
