perf: 减少一次不必要的连战次数变更

This commit is contained in:
status102
2025-05-08 10:02:46 +08:00
parent 8458f1f9ca
commit fad7705d04
2 changed files with 3 additions and 6 deletions

View File

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

View File

@@ -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; // 是否药品、石头用完
};
}