mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 01:59:33 +08:00
fix: 修复理智数据的一系列问题
This commit is contained in:
@@ -423,7 +423,7 @@ void Assistant::working_proc()
|
||||
callback_json["finished_tasks"] = json::array(finished_tasks);
|
||||
|
||||
const auto& sanity_report = status()->get_str(Status::FightSanityReport);
|
||||
if (sanity_report) {
|
||||
if (sanity_report && !sanity_report.value().empty()) {
|
||||
// [100, 135, "2023-09-01 09:31:53.527"]
|
||||
auto sanity_array = json::array(json::parse(*sanity_report).value_or(json::value(json::array())));
|
||||
callback_json["sanity"] = sanity_array;
|
||||
|
||||
@@ -623,6 +623,11 @@ namespace MaaWpfGui.Main
|
||||
break;
|
||||
}
|
||||
|
||||
if (!sanity_report.Select(i => i.Type).SequenceEqual(new[] { JTokenType.Integer, JTokenType.Integer, JTokenType.String }))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
int[] sanity = sanity_report.Take(2).Select(i => (int)i).ToArray();
|
||||
if (sanity[0] < 0 || sanity[1] <= 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user