feat: 如果任务流程中勾选了刷理智,则在任务链结束时提供一个理智回满的预测时间

This commit is contained in:
status102
2023-09-20 17:07:57 +08:00
parent 059d83b1c7
commit 2a2a91ceed
10 changed files with 64 additions and 11 deletions

View File

@@ -421,6 +421,14 @@ void Assistant::working_proc()
if (m_tasks_list.empty()) {
callback_json["finished_tasks"] = json::array(finished_tasks);
const auto& sanity_str = status()->get_str(Status::FightSanityReport);
if (sanity_str) {
auto sanity_array = json::array(json::parse(*sanity_str).value_or(json::value(json::array())));
// ["100/135", "2023-09-01 09:31:53.527"]
callback_json["sanity"] = sanity_array;
}
append_callback(AsstMsg::AllTasksCompleted, callback_json);
finished_tasks.clear();
clear_cache();