1
0

relocate RemoveCurrentSpell to apply whenever DeleteActiveSpell called (since its removal deletes the lua spell ptr)

This commit is contained in:
Emagi 2024-09-07 17:12:26 -04:00
parent f6097f490c
commit c4002c363e

View File

@ -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);
}