From cbceae037e42c22118e26dbd23112f23ffd80ab4 Mon Sep 17 00:00:00 2001 From: MistEO Date: Sat, 28 Jan 2023 06:49:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8D=95=E6=8E=A7?= =?UTF-8?q?=E7=9A=84=E4=B8=80=E4=BA=9Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaCore/Task/Miscellaneous/BattleProcessTask.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MaaCore/Task/Miscellaneous/BattleProcessTask.cpp b/src/MaaCore/Task/Miscellaneous/BattleProcessTask.cpp index b47a82dc31..df4f1ef22e 100644 --- a/src/MaaCore/Task/Miscellaneous/BattleProcessTask.cpp +++ b/src/MaaCore/Task/Miscellaneous/BattleProcessTask.cpp @@ -259,7 +259,7 @@ bool asst::BattleProcessTask::wait_condition(const Action& action) update_cost(image); int pre_cost = m_cost; - while (!need_exit() && m_in_battle) { + while (!need_exit()) { update_cost(image); if (action.cost_changes != 0) { if ((pre_cost + action.cost_changes < 0) ? (m_cost <= pre_cost + action.cost_changes) @@ -290,7 +290,7 @@ bool asst::BattleProcessTask::wait_condition(const Action& action) if (action.costs) { update_image_if_empty(); - while (!need_exit() && m_in_battle) { + while (!need_exit()) { update_cost(image); if (m_cost >= action.costs) { break; @@ -305,7 +305,7 @@ bool asst::BattleProcessTask::wait_condition(const Action& action) // 计算有几个干员在cd if (action.cooling >= 0) { update_image_if_empty(); - while (!need_exit() && m_in_battle) { + while (!need_exit()) { if (!update_deployment(false, image)) { return false; } @@ -322,7 +322,7 @@ bool asst::BattleProcessTask::wait_condition(const Action& action) if (!m_in_bullet_time && action.type == ActionType::Deploy) { const std::string& name = get_name_from_group(action.name); update_image_if_empty(); - while (!need_exit() && m_in_battle) { + while (!need_exit()) { if (!update_deployment(false, image)) { return false; }