1
0

graceful cleanup of spell and allowing player to recast

This commit is contained in:
Emagi 2024-11-22 15:20:16 -05:00
parent 79c3ec1fb2
commit b848f78f41

View File

@ -903,7 +903,7 @@ void LuaInterface::RemoveSpell(LuaSpell* spell, bool call_remove_function, bool
if (spell->caster) if (spell->caster)
{ {
if(spell->caster->GetZone()) { if(spell->caster->GetZone()) {
spell->caster->GetZone()->GetSpellProcess()->RemoveSpellScriptTimerBySpell(spell); spell->caster->GetZone()->GetSpellProcess()->RemoveSpellScriptTimerBySpell(spell, false);
} }
spell->caster->RemoveProc(0, spell); spell->caster->RemoveProc(0, spell);
spell->caster->RemoveMaintainedSpell(spell); spell->caster->RemoveMaintainedSpell(spell);
@ -1639,7 +1639,6 @@ void LuaInterface::DeletePendingSpells(bool all) {
SetLuaUserDataStale(spell); SetLuaUserDataStale(spell);
RemoveCurrentSpell(spell->state, spell, false); RemoveCurrentSpell(spell->state, spell, false);
safe_delete(spell);
} }
} }
MSpellDelete.unlock(); MSpellDelete.unlock();