ret should be set after with the createspellscript
This commit is contained in:
parent
98c0aaf73b
commit
f85ef5eb61
@ -2305,9 +2305,8 @@ LuaSpell* LuaInterface::GetSpellScript(const char* name, bool create_new, bool u
|
|||||||
if (use)
|
if (use)
|
||||||
{
|
{
|
||||||
lua_State* state = spell_script_itr->first;
|
lua_State* state = spell_script_itr->first;
|
||||||
ret = spell_script_itr->second;
|
|
||||||
MSpellScripts.releasereadlock(__FUNCTION__, __LINE__);
|
MSpellScripts.releasereadlock(__FUNCTION__, __LINE__);
|
||||||
CreateSpellScript(name, state);
|
ret = CreateSpellScript(name, state);
|
||||||
break; // don't keep iterating, we already have our result
|
break; // don't keep iterating, we already have our result
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user