From 7fdcae81d8cc99ed154f3efe875d5670590cc122 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 7 Jul 2024 15:54:48 +0200 Subject: Core/Units: Interrupt only spell in CURRENT_GENERIC_SPELL slot with damage taken InterruptFlags instead of all currently cast spells --- src/server/game/Entities/Unit/Unit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 9460f97bea0..bd291f1ee01 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1096,7 +1096,7 @@ bool Unit::HasBreakableByDamageCrowdControlAura(Unit* excludeCasterChannel) cons if (!damageTaken) return spell->m_spellInfo->InterruptFlags.HasFlag(SpellInterruptFlags::ZeroDamageCancels); - if ((victim->IsPlayer() && spell->m_spellInfo->InterruptFlags.HasFlag(SpellInterruptFlags::DamageCancelsPlayerOnly))) + if (victim->IsPlayer() && spell->m_spellInfo->InterruptFlags.HasFlag(SpellInterruptFlags::DamageCancelsPlayerOnly)) return true; if (spell->m_spellInfo->InterruptFlags.HasFlag(SpellInterruptFlags::DamageCancels)) @@ -1110,7 +1110,7 @@ bool Unit::HasBreakableByDamageCrowdControlAura(Unit* excludeCasterChannel) cons if (!damageTaken) return false; - if ((victim->IsPlayer() && spell->m_spellInfo->InterruptFlags.HasFlag(SpellInterruptFlags::DamagePushbackPlayerOnly))) + if (victim->IsPlayer() && spell->m_spellInfo->InterruptFlags.HasFlag(SpellInterruptFlags::DamagePushbackPlayerOnly)) return true; if (spell->m_spellInfo->InterruptFlags.HasFlag(SpellInterruptFlags::DamagePushback)) @@ -1120,7 +1120,7 @@ bool Unit::HasBreakableByDamageCrowdControlAura(Unit* excludeCasterChannel) cons }; if (isCastInterrupted()) - victim->InterruptNonMeleeSpells(false); + victim->InterruptSpell(CURRENT_GENERIC_SPELL, false, false); else if (isCastDelayed()) spell->Delayed(); } -- cgit v1.2.3