diff --git a/src/MaaCore/Task/Fight/StageDropsTaskPlugin.cpp b/src/MaaCore/Task/Fight/StageDropsTaskPlugin.cpp index b38f761bd6..38d302155f 100644 --- a/src/MaaCore/Task/Fight/StageDropsTaskPlugin.cpp +++ b/src/MaaCore/Task/Fight/StageDropsTaskPlugin.cpp @@ -417,7 +417,7 @@ void asst::StageDropsTaskPlugin::upload_to_yituliu() } if (!m_report_yituliu_task_ptr) { - m_report_yituliu_task_ptr = std::make_shared(report_penguin_callback, this); + m_report_yituliu_task_ptr = std::make_shared(report_yituliu_callback, this); } m_report_yituliu_task_ptr->set_report_type(ReportType::YituliuBigDataStageDrops) @@ -427,6 +427,18 @@ void asst::StageDropsTaskPlugin::upload_to_yituliu() .run(); } +void asst::StageDropsTaskPlugin::report_yituliu_callback(AsstMsg msg, const json::value& detail, AbstractTask* task_ptr) +{ + LogTraceFunction; + + auto p_this = dynamic_cast(task_ptr); + if (!p_this) { + return; + } + + p_this->callback(msg, detail); +} + bool asst::StageDropsTaskPlugin::check_stage_valid() { LogTraceFunction; diff --git a/src/MaaCore/Task/Fight/StageDropsTaskPlugin.h b/src/MaaCore/Task/Fight/StageDropsTaskPlugin.h index 52d8dbfd78..936b656260 100644 --- a/src/MaaCore/Task/Fight/StageDropsTaskPlugin.h +++ b/src/MaaCore/Task/Fight/StageDropsTaskPlugin.h @@ -40,6 +40,7 @@ namespace asst bool upload_to_penguin(); // 返回值表示该次掉落是否通过企鹅检查 void upload_to_yituliu(); static void report_penguin_callback(AsstMsg msg, const json::value& detail, AbstractTask* task_ptr); + static void report_yituliu_callback(AsstMsg msg, const json::value& detail, AbstractTask* task_ptr); static inline constexpr int64_t RecognitionTimeOffset = 20; static inline const std::string LastStartTimeKey = Status::ProcessTaskLastTimePrefix + "Fight@StartButton2";