From 0d87e480d1ae1a67e9473f2a0444c976d63a4360 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 12 Feb 2022 19:13:05 +0100 Subject: [PATCH] Fixes the passing of enums in PreventStatBoostChange and ModifyStatBoostChange I kind of forgot how enums work in Angelscript, whoops --- src/ScriptResolving/AngelScript/AngelScriptScript.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ScriptResolving/AngelScript/AngelScriptScript.cpp b/src/ScriptResolving/AngelScript/AngelScriptScript.cpp index 09177a9..245f21a 100644 --- a/src/ScriptResolving/AngelScript/AngelScriptScript.cpp +++ b/src/ScriptResolving/AngelScript/AngelScriptScript.cpp @@ -132,7 +132,7 @@ void AngelScriptScript::PreventStatBoostChange(CreatureLib::Battling::Creature* CreatureLib::Library::Statistic stat, int8_t diffAmount, bool* prevent) { CALL_HOOK(PreventStatBoostChange, { ctx->SetArgObject(0, (void*)target); - ctx->SetArgByte(1, (u8)stat); + ctx->SetArgDWord(1, (i32)stat); ctx->SetArgByte(2, diffAmount); ctx->SetArgAddress(3, prevent); }) @@ -142,7 +142,7 @@ void AngelScriptScript::ModifyStatBoostChange(CreatureLib::Battling::Creature* t CreatureLib::Library::Statistic stat, int8_t* diffAmount) { CALL_HOOK(ModifyStatBoostChange, { ctx->SetArgObject(0, (void*)target); - ctx->SetArgByte(1, (u8)stat); + ctx->SetArgDWord(1, (i32)stat); ctx->SetArgAddress(2, diffAmount); }) }