From f85ef5eb617fcb471040c52a8246565129c5cf0c Mon Sep 17 00:00:00 2001 From: Emagi Date: Sat, 7 Sep 2024 14:52:08 -0400 Subject: [PATCH] ret should be set after with the createspellscript --- source/WorldServer/LuaInterface.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 } }