Changed to have DestroySpells handle luaspell delete instead of active_spells
This commit is contained in:
parent
6f8f5016a6
commit
297c17b177
@ -153,7 +153,7 @@ void LuaInterface::DestroySpells() {
|
|||||||
RemoveCurrentSpell(inner_itr->first, inner_itr->second, false, true, false);
|
RemoveCurrentSpell(inner_itr->first, inner_itr->second, false, true, false);
|
||||||
MSpellDelete.unlock();
|
MSpellDelete.unlock();
|
||||||
lua_close(inner_itr->first);
|
lua_close(inner_itr->first);
|
||||||
// spell is deleted in this context by SpellProcess::DeleteSpell because removing_all_spells = true
|
safe_delete(cur_spell);
|
||||||
}
|
}
|
||||||
|
|
||||||
Mutex* mutex = GetSpellScriptMutex(spell_script_itr->first.c_str());
|
Mutex* mutex = GetSpellScriptMutex(spell_script_itr->first.c_str());
|
||||||
|
@ -67,7 +67,7 @@ void SpellProcess::RemoveAllSpells(bool reload_spells){
|
|||||||
|
|
||||||
active_spells_itr = active_spells.begin();
|
active_spells_itr = active_spells.begin();
|
||||||
while(active_spells_itr.Next()){
|
while(active_spells_itr.Next()){
|
||||||
active_spells.Remove(active_spells_itr->value, true);
|
active_spells.Remove(active_spells_itr->value);
|
||||||
}
|
}
|
||||||
active_spells.clear();
|
active_spells.clear();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user