diff --git a/source/WorldServer/LuaInterface.cpp b/source/WorldServer/LuaInterface.cpp index f68d163..cc42e5a 100644 --- a/source/WorldServer/LuaInterface.cpp +++ b/source/WorldServer/LuaInterface.cpp @@ -2305,9 +2305,8 @@ LuaSpell* LuaInterface::GetSpellScript(const char* name, bool create_new, bool u if (use) { lua_State* state = spell_script_itr->first; - ret = spell_script_itr->second; MSpellScripts.releasereadlock(__FUNCTION__, __LINE__); - CreateSpellScript(name, state); + ret = CreateSpellScript(name, state); break; // don't keep iterating, we already have our result } }