fix: 修改错误的回调

This commit is contained in:
uye
2023-11-11 02:37:43 +08:00
parent 3983509636
commit e7ea339925
2 changed files with 14 additions and 1 deletions

View File

@@ -417,7 +417,7 @@ void asst::StageDropsTaskPlugin::upload_to_yituliu()
}
if (!m_report_yituliu_task_ptr) {
m_report_yituliu_task_ptr = std::make_shared<ReportDataTask>(report_penguin_callback, this);
m_report_yituliu_task_ptr = std::make_shared<ReportDataTask>(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<StageDropsTaskPlugin*>(task_ptr);
if (!p_this) {
return;
}
p_this->callback(msg, detail);
}
bool asst::StageDropsTaskPlugin::check_stage_valid()
{
LogTraceFunction;

View File

@@ -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";