Core/Spells: Don't put ritual spells on cooldown if the ritual was not completed

This commit is contained in:
luis
2026-09-22 20:57:12 -03:00
parent 6aee5fae08
commit 515efb2f86
+8 -1
View File
@@ -3678,7 +3678,14 @@ void Spell::cancel(SpellCastResult result /*= SPELL_FAILED_INTERRUPTED*/, Option
{
m_originalCaster->RemoveDynObject(m_spellInfo->Id);
if (m_spellInfo->IsChanneled()) // if not channeled then the object for the current cast wasn't summoned yet
m_originalCaster->RemoveGameObject(m_spellInfo->Id, true);
{
if (GameObject* gameObject = m_originalCaster->GetGameObject(m_spellInfo->Id))
{
m_originalCaster->RemoveGameObject(gameObject, true);
if (gameObject->GetGoType() == GAMEOBJECT_TYPE_RITUAL)
m_originalCaster->GetSpellHistory()->ResetCooldown(m_spellInfo->Id, true);
}
}
}
//set state back so finish will be processed