aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-07-07 15:54:48 +0200
committerOvahlord <dreadkiller@gmx.de>2024-07-08 13:12:57 +0200
commit23545f81827ba358a9a5573a7ab22b14e2bfb2c6 (patch)
tree8bb7e725b65eac195e6b6c869fc246758fae435a /src
parent3a3d242f2701ef083bf51ac9ee7884365ca05bf8 (diff)
Core/Units: Interrupt only spell in CURRENT_GENERIC_SPELL slot with damage taken InterruptFlags instead of all currently cast spells
(cherry picked from commit 7fdcae81d8cc99ed154f3efe875d5670590cc122)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 431bb12acb9..3c127223c86 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();
}