From ce41585226a7c54e29fa3cbe05f0e59845ba8c25 Mon Sep 17 00:00:00 2001 From: Dongw Date: Thu, 12 Oct 2023 12:22:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DCustom=20Action?= =?UTF-8?q?=E4=B8=AD=E9=80=94=E9=87=8A=E6=94=BE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/cli/CustomAction/CustomActionRegistry.h | 3 +-- source/cli/main.cpp | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/cli/CustomAction/CustomActionRegistry.h b/source/cli/CustomAction/CustomActionRegistry.h index 274804e..f1e62c8 100644 --- a/source/cli/CustomAction/CustomActionRegistry.h +++ b/source/cli/CustomAction/CustomActionRegistry.h @@ -27,9 +27,8 @@ void custom_action_init(CustomActionRegistrar& registrar) registrar.add_action("QTE2", combat_QTE2); } -void register_custom_action(MaaInstanceHandle maa_handle) +void register_custom_action(MaaInstanceHandle maa_handle, CustomActionRegistrar& registerar) { - CustomActionRegistrar registerar; custom_action_init(registerar); registerar.register_actions(maa_handle); } \ No newline at end of file diff --git a/source/cli/main.cpp b/source/cli/main.cpp index 96424ae..18fc207 100644 --- a/source/cli/main.cpp +++ b/source/cli/main.cpp @@ -91,7 +91,8 @@ int main(int argc, char** argv) return -1; } - register_custom_action(maa_handle); + CustomActionRegistrar registerar; + register_custom_action(maa_handle, registerar); MaaTaskId task_id = 0; for (const auto& task : tasks) {