Core/Spells: Use dbc flag to check if channeled spell can be interrupted
Closes #2292
This commit is contained in:
@@ -4333,7 +4333,8 @@ void Spell::EffectInterruptCast(SpellEffIndex effIndex)
|
||||
|
||||
// TODO: not all spells that used this effect apply cooldown at school spells
|
||||
// also exist case: apply cooldown to interrupted cast only and to all spells
|
||||
for (uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_MAX_SPELL; ++i)
|
||||
// there is no CURRENT_AUTOREPEAT_SPELL spells that can be interrupted
|
||||
for (uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_AUTOREPEAT_SPELL; ++i)
|
||||
{
|
||||
if (Spell* spell = unitTarget->GetCurrentSpell(CurrentSpellTypes(i)))
|
||||
{
|
||||
@@ -4341,7 +4342,9 @@ void Spell::EffectInterruptCast(SpellEffIndex effIndex)
|
||||
// check if we can interrupt spell
|
||||
if ((spell->getState() == SPELL_STATE_CASTING
|
||||
|| (spell->getState() == SPELL_STATE_PREPARING && spell->CalcCastTime() > 0.0f))
|
||||
&& curSpellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_INTERRUPT && curSpellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE)
|
||||
&& curSpellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE
|
||||
&& ((i == CURRENT_GENERIC_SPELL && curSpellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_INTERRUPT)
|
||||
|| (i == CURRENT_CHANNELED_SPELL && curSpellInfo->ChannelInterruptFlags & CHANNEL_INTERRUPT_FLAG_INTERRUPT)))
|
||||
{
|
||||
if (m_originalCaster)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user