PkmnLib/src/ScriptResolving/AngelScript/AngelScriptEvolutionScript.cpp

20 lines
845 B
C++

#include "AngelScriptEvolutionScript.hpp"
#include "AngelScriptFunctionCall.hpp"
#include "AngelScriptResolver.hpp"
void AngelScriptEvolutionScript::DoesEvolveFromLevelUp(
const ArbUt::BorrowedPtr<const PkmnLib::Library::EvolutionData>& evolution,
const ArbUt::BorrowedPtr<const PkmnLib::Battling::Pokemon>& pokemon, bool* out) const {
if (!__DoesEvolveFromLevelUp.Exists) {
return;
}
AngelScriptUtils::AngelscriptFunctionCall(
__DoesEvolveFromLevelUp.Function, _resolver->GetContextPool(), _scriptObject, _resolver, ""_cnc,
[&]([[maybe_unused]] asIScriptContext* ctx) {
ctx->SetArgObject(0, (void*)evolution.GetRaw());
ctx->SetArgObject(1, (void*)pokemon.GetRaw());
ctx->SetArgObject(2, out);
},
[&]([[maybe_unused]] asIScriptContext* ctx) {});
}