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) {