diff --git a/src/ScriptResolving/AngelScript/AngelScriptItemUseScript.cpp b/src/ScriptResolving/AngelScript/AngelScriptItemUseScript.cpp index ef19205..af11b42 100644 --- a/src/ScriptResolving/AngelScript/AngelScriptItemUseScript.cpp +++ b/src/ScriptResolving/AngelScript/AngelScriptItemUseScript.cpp @@ -50,12 +50,12 @@ bool AngelScriptItemUseScript::IsCreatureUseItem() const { return res; } bool AngelScriptItemUseScript::IsUseValidForCreature(CreatureLib::Battling::Creature* creature) const { - if (!__IsPokemonUseItem.Exists) { + if (!__IsUseValidForPokemon.Exists) { return CreatureLib::Battling::ItemUseScript::IsUseValidForCreature(creature); } bool res = false; 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) { res = ctx->GetReturnByte() == 1; }); return res;