Core/Spells: Only interrupt spells with interrupt flag Combat when spell also has SPELL_ATTR0_CANT_USED_IN_COMBAT attribute

This commit is contained in:
Shauren authored and Ovahlord committed 2021-04-29 20:37:18 +02:00
1 parent a18aa89f55
commit 22eaf31bfa
1 file changed
+3 -1
+3 -1
View File
@@ -9139,7 +9139,9 @@ void Unit::setDeathState(DeathState s)
void Unit::AtEnterCombat()
{
if (Spell* spell = m_currentSpells[CURRENT_GENERIC_SPELL])
if (spell->getState() == SPELL_STATE_PREPARING && spell->m_spellInfo->InterruptFlags.HasFlag(SpellInterruptFlags::Combat))
if (spell->getState() == SPELL_STATE_PREPARING
&& spell->m_spellInfo->HasAttribute(SPELL_ATTR0_CANT_USED_IN_COMBAT)
&& spell->m_spellInfo->InterruptFlags.HasFlag(SpellInterruptFlags::Combat))
InterruptNonMeleeSpells(false);
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags::EnteringCombat);