Fixes IsUseValidForCreature Angelscript function calling wrong function.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
1540009912
commit
9f973c53df
|
@ -50,12 +50,12 @@ bool AngelScriptItemUseScript::IsCreatureUseItem() const {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
bool AngelScriptItemUseScript::IsUseValidForCreature(CreatureLib::Battling::Creature* creature) const {
|
bool AngelScriptItemUseScript::IsUseValidForCreature(CreatureLib::Battling::Creature* creature) const {
|
||||||
if (!__IsPokemonUseItem.Exists) {
|
if (!__IsUseValidForPokemon.Exists) {
|
||||||
return CreatureLib::Battling::ItemUseScript::IsUseValidForCreature(creature);
|
return CreatureLib::Battling::ItemUseScript::IsUseValidForCreature(creature);
|
||||||
}
|
}
|
||||||
bool res = false;
|
bool res = false;
|
||||||
AngelScriptUtils::AngelscriptFunctionCall(
|
AngelScriptUtils::AngelscriptFunctionCall(
|
||||||
__IsPokemonUseItem.Function, _resolver->GetContextPool(), _scriptObject, ""_cnc,
|
__IsUseValidForPokemon.Function, _resolver->GetContextPool(), _scriptObject, ""_cnc,
|
||||||
[&]([[maybe_unused]] asIScriptContext* ctx) { ctx->SetArgObject(0, (void*)creature); },
|
[&]([[maybe_unused]] asIScriptContext* ctx) { ctx->SetArgObject(0, (void*)creature); },
|
||||||
[&]([[maybe_unused]] asIScriptContext* ctx) { res = ctx->GetReturnByte() == 1; });
|
[&]([[maybe_unused]] asIScriptContext* ctx) { res = ctx->GetReturnByte() == 1; });
|
||||||
return res;
|
return res;
|
||||||
|
|
Loading…
Reference in New Issue