From 9e986f3acedc74f4c71669f34e8800ff47b034ba Mon Sep 17 00:00:00 2001 From: Emagi Date: Sun, 1 Dec 2024 17:55:42 -0500 Subject: [PATCH] rely on remaining targets to delete the spell, caster ptr is not reliable in this case --- source/WorldServer/LuaInterface.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/source/WorldServer/LuaInterface.cpp b/source/WorldServer/LuaInterface.cpp index a7634ee..50eab7e 100644 --- a/source/WorldServer/LuaInterface.cpp +++ b/source/WorldServer/LuaInterface.cpp @@ -1614,11 +1614,7 @@ void LuaInterface::DeletePendingSpells(bool all) { spell = *del_itr; if(!all) { - if (spell->caster) { - ZoneServer* curZone = spell->caster->GetZone(); - if(curZone) - curZone->GetSpellProcess()->DeleteActiveSpell(spell, true); - } + // rely on targets the spell->caster could be corrupt if(spell->targets.size() > 0) { spell->MSpellTargets.readlock(__FUNCTION__, __LINE__); for (int8 i = 0; i < spell->targets.size(); i++) {