From b848f78f411b2247aa2dcbf8989f58f6abbede75 Mon Sep 17 00:00:00 2001 From: Emagi Date: Fri, 22 Nov 2024 15:20:16 -0500 Subject: [PATCH] graceful cleanup of spell and allowing player to recast --- source/WorldServer/LuaInterface.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/WorldServer/LuaInterface.cpp b/source/WorldServer/LuaInterface.cpp index 873bbed..70f2758 100644 --- a/source/WorldServer/LuaInterface.cpp +++ b/source/WorldServer/LuaInterface.cpp @@ -903,7 +903,7 @@ void LuaInterface::RemoveSpell(LuaSpell* spell, bool call_remove_function, bool if (spell->caster) { if(spell->caster->GetZone()) { - spell->caster->GetZone()->GetSpellProcess()->RemoveSpellScriptTimerBySpell(spell); + spell->caster->GetZone()->GetSpellProcess()->RemoveSpellScriptTimerBySpell(spell, false); } spell->caster->RemoveProc(0, spell); spell->caster->RemoveMaintainedSpell(spell); @@ -1639,7 +1639,6 @@ void LuaInterface::DeletePendingSpells(bool all) { SetLuaUserDataStale(spell); RemoveCurrentSpell(spell->state, spell, false); - safe_delete(spell); } } MSpellDelete.unlock();