fix: 自动战斗-战斗列表启用时,自动追加摆完挂机选项

close #6507
This commit is contained in:
status102
2023-09-25 11:00:03 +08:00
parent 07b793204e
commit 0dd1405061
3 changed files with 9 additions and 1 deletions

View File

@@ -118,6 +118,7 @@ bool asst::CopilotTask::set_params(const json::value& params)
// 启用队列的话这项为true
bool need_navigate = params.get("need_navigate", false);
m_task_file_reload_task_ptr->set_enable(need_navigate);
m_battle_task_ptr->set_wait_until_end(need_navigate);
// 不使用代理指挥
m_not_use_prts_task_ptr->set_enable(need_navigate);

View File

@@ -78,6 +78,11 @@ bool asst::BattleProcessTask::set_stage_name(const std::string& stage_name)
return true;
}
void asst::BattleProcessTask::set_wait_until_end(bool wait_until_end)
{
m_need_to_wait_until_end = wait_until_end;
}
bool asst::BattleProcessTask::to_group()
{
std::unordered_map<std::string, std::vector<std::string>> groups;

View File

@@ -15,6 +15,7 @@ namespace asst
virtual ~BattleProcessTask() override = default;
virtual bool set_stage_name(const std::string& stage_name) override;
void set_wait_until_end(bool wait_until_end);
protected:
virtual bool _run() override;
@@ -27,7 +28,7 @@ namespace asst
return false;
}
virtual battle::copilot::CombatData& get_combat_data() { return m_combat_data; }
virtual bool need_to_wait_until_end() const { return false; }
virtual bool need_to_wait_until_end() const { return m_need_to_wait_until_end; }
bool to_group();
bool do_action(const battle::copilot::Action& action, size_t index);
@@ -42,5 +43,6 @@ namespace asst
std::unordered_map</*group*/ std::string, /*oper*/ std::string> m_oper_in_group;
bool m_in_bullet_time = false;
bool m_need_to_wait_until_end = false;
};
}