fix: 自动战斗-战斗列表启用时,对所有作业追加摆完挂机选项操作 (#6533)

- close #6507
This commit is contained in:
MistEO
2023-09-26 09:42:43 +08:00
committed by GitHub
6 changed files with 12 additions and 4 deletions

View File

@@ -44,7 +44,7 @@ AsstTaskId ASSTAPI AsstAppendTask(AsstHandle handle, const char* type, const cha
"client_type": string, // 客户端版本,可选,默认为空
// 选项:"Official" | "Bilibili" | "txwy" | "YoStarEN" | "YoStarJP" | "YoStarKR"
"start_game_enabled": bool, // 是否自动启动客户端,可选,默认不启动
"account_name": string // 切换账号,可选,默认为当前账号
"account_name": string // 切换账号,可选,默认不切换
// 仅支持切换至已登录的账号,使用登录名进行查找,保证输入内容在所有已登录账号唯一即可
// 官服123****4567可输入 123****4567、4567、123、3****4567
// B服张三可输入 张三、张、三

View File

@@ -44,7 +44,7 @@ AsstTaskId ASSTAPI AsstAppendTask(AsstHandle handle, const char* type, const cha
"client_type": string, // 用戶端版本,可選,預設為空
// 選項:"Official" | "Bilibili" | "txwy" | "YoStarEN" | "YoStarJP" | "YoStarKR"
"start_game_enabled": bool, // 是否自動啟動用戶端,可選,預設不啟動
"account_name": string // 切換賬號,可選,預設為當前賬號
"account_name": string // 切換賬號,可選,預設不切換
// 僅支持切換至已登錄的賬號,使用登錄名進行查找,保證輸入內容在所有已登錄賬號唯一即可
// 官服123****4567可輸入 123****4567、4567、123、3****4567
// B服張三可輸入 張三、張、三

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

View File

@@ -57,7 +57,7 @@
hc:BorderElement.CornerRadius="4,0,0,4"
DropDownOpened="{s:Action OnDropDownOpened}"
IsEditable="True"
IsEnabled="{c:Binding '(Idle) and (StartEnabled)'}"
IsReadOnly="{c:Binding Path=!Idle}"
Text="{Binding Filename}" />
<Button
Grid.Column="1"