mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 18:01:26 +08:00
perf: 减少一次不必要的连战次数变更
This commit is contained in:
@@ -144,11 +144,8 @@ std::optional<int> asst::FightTimesTaskPlugin::change_series(int sanity_current,
|
||||
}
|
||||
|
||||
auto ret = select_series(true);
|
||||
if (!ret) {
|
||||
select_series(1);
|
||||
if (m_is_medicine_exhausted) { // 药品用完, 且没有次数可用, 刷理智结束
|
||||
m_task_ptr->set_enable(false);
|
||||
}
|
||||
if (!ret && m_is_medicine_exhausted) { // 药品用完, 且没有次数可用, 刷理智结束
|
||||
m_task_ptr->set_enable(false);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -66,6 +66,6 @@ private:
|
||||
int m_series = -1; // 连续战斗次数
|
||||
int m_series_current = 1; // 当前连战次数
|
||||
mutable bool m_has_used_medicine = false; // 是否使用过药品
|
||||
mutable bool m_is_medicine_exhausted = false; // 是否药品用完
|
||||
mutable bool m_is_medicine_exhausted = false; // 是否药品、石头用完
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user