Core/Spells: Fixed Rapid Fire being interrupted by Auto Shot

This commit is contained in:
luis
2026-09-26 20:30:31 -03:00
parent aa08843e07
commit 72a879d9cb
+5 -3
View File
@@ -3307,8 +3307,10 @@ bool Unit::IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled /*= false*/,
if (!skipChanneled && m_currentSpells[CURRENT_CHANNELED_SPELL] &&
(m_currentSpells[CURRENT_CHANNELED_SPELL]->getState() != SPELL_STATE_FINISHED))
{
if ((!isAutoshoot || !m_currentSpells[CURRENT_CHANNELED_SPELL]->m_spellInfo->HasAttribute(SPELL_ATTR2_DO_NOT_RESET_COMBAT_TIMERS)) &&
(!skipChanneledAllowingActions || !m_currentSpells[CURRENT_CHANNELED_SPELL]->m_spellInfo->HasAttribute(SPELL_ATTR5_ALLOW_ACTIONS_DURING_CHANNEL)))
SpellInfo const* channeledSpellInfo = m_currentSpells[CURRENT_CHANNELED_SPELL]->m_spellInfo;
if ((!isAutoshoot || !channeledSpellInfo->HasAttribute(SPELL_ATTR2_DO_NOT_RESET_COMBAT_TIMERS) || channeledSpellInfo->HasChannelInterruptFlag(SpellAuraInterruptFlags::Action | SpellAuraInterruptFlags::ActionDelayed)) &&
(!skipChanneledAllowingActions || !channeledSpellInfo->HasAttribute(SPELL_ATTR5_ALLOW_ACTIONS_DURING_CHANNEL)))
return true;
}
// autorepeat spells may be finished or delayed, but they are still considered cast
@@ -4389,7 +4391,7 @@ void Unit::RemoveAurasWithInterruptFlags(InterruptFlags flag, SpellInfo const* s
&& spell->GetSpellInfo()->HasChannelInterruptFlag(flag)
&& (!source || spell->GetSpellInfo()->Id != source->Id)
&& !IsInterruptFlagIgnoredForSpell(flag, this, spell->GetSpellInfo(), true, source))
InterruptNonMeleeSpells(false);
InterruptSpell(CURRENT_CHANNELED_SPELL, false, false);
UpdateInterruptMask();
}