From b0f9daef60b6fd9f053c5e473658e7efc2671366 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 21 Nov 2021 13:17:25 +0100 Subject: [PATCH] Fixes invalid set up of ChangeAttack. --- src/ScriptResolving/AngelScript/AngelScriptScript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ScriptResolving/AngelScript/AngelScriptScript.cpp b/src/ScriptResolving/AngelScript/AngelScriptScript.cpp index 3a2c4dc..d1be760 100644 --- a/src/ScriptResolving/AngelScript/AngelScriptScript.cpp +++ b/src/ScriptResolving/AngelScript/AngelScriptScript.cpp @@ -50,7 +50,7 @@ void AngelScriptScript::OnBeforeTurn(const CreatureLib::Battling::BaseTurnChoice void AngelScriptScript::ChangeAttack(CreatureLib::Battling::AttackTurnChoice* choice, ArbUt::StringView* outAttack) { CALL_HOOK(ChangeAttack, { ctx->SetArgObject(0, (void*)choice); - ctx->SetArgAddress(0, outAttack); + ctx->SetArgAddress(1, outAttack); }) } void AngelScriptScript::PreventAttack(CreatureLib::Battling::ExecutingAttack* attack, bool* outResult) {