mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
refactor: 重构干员头像缓存机制
This commit is contained in:
@@ -27,6 +27,7 @@ using namespace asst::battle::copilot;
|
||||
asst::BattleProcessTask::BattleProcessTask(const AsstCallback& callback, Assistant* inst, std::string_view task_chain)
|
||||
: AbstractTask(callback, inst, task_chain), BattleHelper(inst)
|
||||
{}
|
||||
|
||||
bool asst::BattleProcessTask::_run()
|
||||
{
|
||||
LogTraceFunction;
|
||||
@@ -37,7 +38,6 @@ bool asst::BattleProcessTask::_run()
|
||||
return false;
|
||||
}
|
||||
|
||||
load_cache();
|
||||
update_deployment(true);
|
||||
to_group();
|
||||
|
||||
@@ -78,18 +78,6 @@ bool asst::BattleProcessTask::set_stage_name(const std::string& stage_name)
|
||||
return true;
|
||||
}
|
||||
|
||||
void asst::BattleProcessTask::load_cache()
|
||||
{
|
||||
LogTraceFunction;
|
||||
|
||||
for (const auto& oper_list : get_combat_data().groups | views::values) {
|
||||
for (const auto& oper : oper_list) {
|
||||
load_avatar_cache(oper.name, true);
|
||||
}
|
||||
}
|
||||
// TODO: 识别编队,额外加载编队中有的干员的缓存
|
||||
}
|
||||
|
||||
bool asst::BattleProcessTask::to_group()
|
||||
{
|
||||
std::unordered_map<std::string, std::vector<std::string>> groups;
|
||||
|
||||
Reference in New Issue
Block a user