fix(Core/Spell): Make use of SPELL_ATTR6_NOT_RESET_SWING_IF_INSTANT (#4931)

This commit is contained in:
Kitzunu
2021-03-24 23:58:41 +01:00
committed by GitHub
parent 0e8cb3e4b2
commit 83e430f28a

View File

@@ -7379,8 +7379,18 @@ 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);
/// @todo changed SPELL_INTERRUPT_FLAG_AUTOATTACK -> SPELL_INTERRUPT_FLAG_INTERRUPT to fix compile - is this check correct at all?
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(bool go) const