Core/Spells: ported proc flag updates from master branch

This commit is contained in:
Ovahlord committed 2022-02-22 21:19:09 +01:00
1 parent e83c5955b4
commit 78896a132f
9 files changed
+180 -162

No files matched your search

+5 -8
View File
@@ -2903,14 +2903,11 @@ void Spell::EffectInterruptCast(SpellEffIndex effIndex)
|| (spell->getState() == SPELL_STATE_PREPARING && spell->GetCastTime() > 0.0f))
&& curSpellInfo->CanBeInterrupted(unitTarget))
{
if (m_originalCaster)
{
int32 duration = m_spellInfo->GetDuration();
unitTarget->GetSpellHistory()->LockSpellSchool(curSpellInfo->GetSchoolMask(), unitTarget->ModSpellDuration(m_spellInfo, unitTarget, duration, false, 1 << effIndex));
m_originalCaster->ProcSkillsAndAuras(unitTarget, PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_NEG | PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS,
PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_NEG | PROC_FLAG_TAKEN_SPELL_MELEE_DMG_CLASS, PROC_SPELL_TYPE_MASK_ALL,
PROC_SPELL_PHASE_HIT, PROC_HIT_INTERRUPT, nullptr, nullptr, nullptr);
}
int32 duration = m_spellInfo->GetDuration();
duration = unitTarget->ModSpellDuration(m_spellInfo, unitTarget, duration, false, 1 << effIndex);
unitTarget->GetSpellHistory()->LockSpellSchool(curSpellInfo->GetSchoolMask(), duration);
m_hitMask |= PROC_HIT_INTERRUPT;
ExecuteLogEffectInterruptCast(effIndex, unitTarget, curSpellInfo->Id);
unitTarget->InterruptSpell(CurrentSpellTypes(i), false);
}