From e7a187cf8697f6ec7e5e670969039e40245207ad Mon Sep 17 00:00:00 2001 From: Emagi Date: Sun, 22 Sep 2024 21:11:48 -0400 Subject: [PATCH] active spells updates --- source/WorldServer/SpellProcess.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/WorldServer/SpellProcess.cpp b/source/WorldServer/SpellProcess.cpp index 57c0176..aa80bda 100644 --- a/source/WorldServer/SpellProcess.cpp +++ b/source/WorldServer/SpellProcess.cpp @@ -445,9 +445,6 @@ bool SpellProcess::DeleteCasterSpell(LuaSpell* spell, string reason, bool removi return target_valid; } spell->MSpellTargets.releasewritelock(__FUNCTION__, __LINE__); - - if (active_spells.count(spell) > 0) - active_spells.Remove(spell); if (!zone_shutting_down && spell->caster) { // spell->caster ptr cannot be trusted during zone shutdown if(spell->caster->GetThreatTransfer() && spell->caster->GetThreatTransfer()->Spell == spell) { spell->caster->SetThreatTransfer(nullptr); @@ -3023,7 +3020,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); + active_spells.Remove(spell, true, 2000); } bool SpellProcess::AddLuaSpellTarget(LuaSpell* lua_spell, int32 id, bool lock_spell_targets) {