address spell state not getting reset if call process failed to trigger
This commit is contained in:
parent
48ee02ea90
commit
8ac01db525
@ -560,8 +560,10 @@ bool SpellProcess::ProcessSpell(LuaSpell* spell, bool first_cast, const char* fu
|
|||||||
if(altSpawn)
|
if(altSpawn)
|
||||||
{
|
{
|
||||||
std::string functionCall = ApplyLuaFunction(spell, first_cast, function, timer, altSpawn);
|
std::string functionCall = ApplyLuaFunction(spell, first_cast, function, timer, altSpawn);
|
||||||
if(functionCall.length() < 1)
|
if(functionCall.length() < 1) {
|
||||||
ret = false;
|
ret = false;
|
||||||
|
lua_interface->ResetFunctionStack(spell->state);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ret = lua_interface->CallSpellProcess(spell, 2 + spell->spell->GetLUAData()->size(), functionCall);
|
ret = lua_interface->CallSpellProcess(spell, 2 + spell->spell->GetLUAData()->size(), functionCall);
|
||||||
}
|
}
|
||||||
@ -570,8 +572,10 @@ bool SpellProcess::ProcessSpell(LuaSpell* spell, bool first_cast, const char* fu
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
std::string functionCall = ApplyLuaFunction(spell, first_cast, function, timer);
|
std::string functionCall = ApplyLuaFunction(spell, first_cast, function, timer);
|
||||||
if(functionCall.length() < 1)
|
if(functionCall.length() < 1) {
|
||||||
ret = false;
|
ret = false;
|
||||||
|
lua_interface->ResetFunctionStack(spell->state);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ret = lua_interface->CallSpellProcess(spell, 2 + spell->spell->GetLUAData()->size(), functionCall);
|
ret = lua_interface->CallSpellProcess(spell, 2 + spell->spell->GetLUAData()->size(), functionCall);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user