From c4002c363e77c2831b05a5f4cafca1a5cd699252 Mon Sep 17 00:00:00 2001 From: Emagi Date: Sat, 7 Sep 2024 17:12:26 -0400 Subject: [PATCH] relocate RemoveCurrentSpell to apply whenever DeleteActiveSpell called (since its removal deletes the lua spell ptr) --- source/WorldServer/SpellProcess.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/WorldServer/SpellProcess.cpp b/source/WorldServer/SpellProcess.cpp index dd02a8d..88e0730 100644 --- a/source/WorldServer/SpellProcess.cpp +++ b/source/WorldServer/SpellProcess.cpp @@ -2975,7 +2975,6 @@ void SpellProcess::DeleteSpell(LuaSpell* spell) } lua_interface->SetLuaUserDataStale(spell); - lua_interface->RemoveCurrentSpell(spell->state, spell, true); DeleteActiveSpell(spell); } @@ -3024,6 +3023,7 @@ void SpellProcess::AddSelfAndPetToCharTargets(LuaSpell* spell, Spawn* caster, bo } void SpellProcess::DeleteActiveSpell(LuaSpell* spell) { + lua_interface->RemoveCurrentSpell(spell->state, spell, true); active_spells.Remove(spell, true); }