fix(Core/Spell) Ritual spells cooldown on cancel (#19604)

762f78b313

Co-authored-by: killerwife <killerwife@gmail.com>
This commit is contained in:
Saqra1
2024-08-13 10:05:12 -05:00
committed by GitHub
parent c33e30f75a
commit ad411b49b7

View File

@@ -3738,6 +3738,9 @@ void Spell::cancel(bool bySelf)
if (Unit* unit = m_caster->GetGUID() == ihit->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, ihit->targetGUID))
unit->RemoveOwnedAura(m_spellInfo->Id, m_originalCasterGUID, 0, AURA_REMOVE_BY_CANCEL);
if (m_spellInfo->HasAttribute(SPELL_ATTR0_COOLDOWN_ON_EVENT))
m_caster->ToPlayer()->RemoveSpellCooldown(m_spellInfo->Id, true);
SendChannelUpdate(0);
SendInterrupted(SPELL_FAILED_INTERRUPTED);
}