更名operBox
@@ -9597,17 +9597,17 @@
|
||||
20
|
||||
]
|
||||
},
|
||||
"OperatorBegin": {
|
||||
"OperBoxBegin": {
|
||||
"algorithm": "JustReturn",
|
||||
"action": "DoNothing",
|
||||
"next": [
|
||||
"OperatorEnter",
|
||||
"OperatorRoleTabSelect",
|
||||
"OperatorRoleTab",
|
||||
"OperatorEnter@ReturnTo"
|
||||
"OperBoxEnter",
|
||||
"OperBoxRoleTabSelect",
|
||||
"OperBoxRoleTab",
|
||||
"OperBoxEnter@ReturnTo"
|
||||
]
|
||||
},
|
||||
"OperatorEnter": {
|
||||
"OperBoxEnter": {
|
||||
"action": "ClickSelf",
|
||||
"roi": [
|
||||
935,
|
||||
@@ -9616,10 +9616,10 @@
|
||||
110
|
||||
],
|
||||
"next": [
|
||||
"OperatorRoleTabSelect"
|
||||
"OperBoxRoleTabSelect"
|
||||
]
|
||||
},
|
||||
"OperatorRoleTabSelect": {
|
||||
"OperBoxRoleTabSelect": {
|
||||
"action": "ClickSelf",
|
||||
"roi": [
|
||||
1200,
|
||||
@@ -9628,10 +9628,10 @@
|
||||
50
|
||||
],
|
||||
"next": [
|
||||
"OperatorRoleTab"
|
||||
"OperBoxRoleTab"
|
||||
]
|
||||
},
|
||||
"OperatorRoleTab": {
|
||||
"OperBoxRoleTab": {
|
||||
"action": "DoNothing",
|
||||
"roi": [
|
||||
1195,
|
||||
@@ -9640,7 +9640,7 @@
|
||||
50
|
||||
]
|
||||
},
|
||||
"OperatorSlowlySwipeToTheRight": {
|
||||
"OperBoxSlowlySwipeToTheRight": {
|
||||
"doc": "6个横向干员防止识别不全990px",
|
||||
"baseTask": "SlowlySwipeToTheRight",
|
||||
"specificRect": [
|
||||
@@ -9656,7 +9656,7 @@
|
||||
20
|
||||
]
|
||||
},
|
||||
"OperatorNameFlagLV": {
|
||||
"OperBoxFlagLV": {
|
||||
"templThreshold": 0.7,
|
||||
"roi": [
|
||||
40,
|
||||
@@ -9665,19 +9665,7 @@
|
||||
327
|
||||
]
|
||||
},
|
||||
"OperatorOCR": {
|
||||
"algorithm": "OcrDetect",
|
||||
"fullMatch": true,
|
||||
"text": [],
|
||||
"roi": [
|
||||
10,
|
||||
0,
|
||||
130,
|
||||
20
|
||||
],
|
||||
"postDelay": 100
|
||||
},
|
||||
"OperatorOCRLV": {
|
||||
"OperBoxNameOCR": {
|
||||
"algorithm": "OcrDetect",
|
||||
"fullMatch": true,
|
||||
"text": [],
|
||||
|
||||
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -15,7 +15,7 @@
|
||||
#include "Task/Interface/FightTask.h"
|
||||
#include "Task/Interface/InfrastTask.h"
|
||||
#include "Task/Interface/MallTask.h"
|
||||
#include "Task/Interface/OperTask.h"
|
||||
#include "Task/Interface/OperBoxTask.h"
|
||||
#include "Task/Interface/ReclamationTask.h"
|
||||
#include "Task/Interface/RecruitTask.h"
|
||||
#include "Task/Interface/RoguelikeTask.h"
|
||||
@@ -201,7 +201,7 @@ asst::Assistant::TaskId asst::Assistant::append_task(const std::string& type, co
|
||||
ASST_ASSISTANT_APPEND_TASK_FROM_STRING_IF_BRANCH(SingleStepTask)
|
||||
ASST_ASSISTANT_APPEND_TASK_FROM_STRING_IF_BRANCH(VideoRecognitionTask)
|
||||
ASST_ASSISTANT_APPEND_TASK_FROM_STRING_IF_BRANCH(DepotTask)
|
||||
ASST_ASSISTANT_APPEND_TASK_FROM_STRING_IF_BRANCH(OperTask)
|
||||
ASST_ASSISTANT_APPEND_TASK_FROM_STRING_IF_BRANCH(OperBoxTask)
|
||||
ASST_ASSISTANT_APPEND_TASK_FROM_STRING_IF_BRANCH(ReclamationTask)
|
||||
ASST_ASSISTANT_APPEND_TASK_FROM_STRING_IF_BRANCH(CustomTask)
|
||||
#ifdef ASST_DEBUG
|
||||
|
||||
@@ -60,8 +60,8 @@
|
||||
<ClInclude Include="Task\Experiment\SingleStepBattleProcessTask.h" />
|
||||
<ClInclude Include="Task\Interface\CustomTask.h" />
|
||||
<ClInclude Include="Task\Interface\VideoRecognitionTask.h" />
|
||||
<ClInclude Include="Task\Interface\OperTask.h" />
|
||||
<ClInclude Include="Task\Miscellaneous\OperRecognitionTask.h" />
|
||||
<ClInclude Include="Task\Interface\OperBoxTask.h" />
|
||||
<ClInclude Include="Task\Miscellaneous\OperBoxRecognitionTask.h" />
|
||||
<ClInclude Include="Task\Reclamation\ReclamationControlTask.h" />
|
||||
<ClInclude Include="Task\Reclamation\ReclamationConclusionReportPlugin.h" />
|
||||
<ClInclude Include="Task\Reclamation\ReclamationBattlePlugin.h" />
|
||||
@@ -93,7 +93,7 @@
|
||||
<ClInclude Include="Vision\Miscellaneous\ProcessTaskImageAnalyzer.h" />
|
||||
<ClInclude Include="Vision\Miscellaneous\RecruitImageAnalyzer.h" />
|
||||
<ClInclude Include="Vision\Miscellaneous\StageDropsImageAnalyzer.h" />
|
||||
<ClInclude Include="Vision\Miscellaneous\OperImageAnalyzer.h" />
|
||||
<ClInclude Include="Vision\Miscellaneous\OperBoxImageAnalyzer.h" />
|
||||
<ClInclude Include="Vision\MultiMatchImageAnalyzer.h" />
|
||||
<ClInclude Include="Vision\OcrImageAnalyzer.h" />
|
||||
<ClInclude Include="Vision\OcrWithFlagTemplImageAnalyzer.h" />
|
||||
@@ -215,8 +215,8 @@
|
||||
<ClCompile Include="Task\Experiment\CombatRecordRecognitionTask.cpp" />
|
||||
<ClCompile Include="Task\Experiment\SingleStepBattleProcessTask.cpp" />
|
||||
<ClCompile Include="Task\Interface\VideoRecognitionTask.cpp" />
|
||||
<ClCompile Include="Task\Interface\OperTask.cpp" />
|
||||
<ClCompile Include="Task\Miscellaneous\OperRecognitionTask.cpp" />
|
||||
<ClCompile Include="Task\Interface\OperBoxTask.cpp" />
|
||||
<ClCompile Include="Task\Miscellaneous\OperBoxRecognitionTask.cpp" />
|
||||
<ClCompile Include="Task\Reclamation\ReclamationControlTask.cpp" />
|
||||
<ClCompile Include="Task\Reclamation\ReclamationConclusionReportPlugin.cpp" />
|
||||
<ClCompile Include="Task\Reclamation\ReclamationBattlePlugin.cpp" />
|
||||
@@ -246,7 +246,7 @@
|
||||
<ClCompile Include="Vision\Miscellaneous\ProcessTaskImageAnalyzer.cpp" />
|
||||
<ClCompile Include="Vision\Miscellaneous\RecruitImageAnalyzer.cpp" />
|
||||
<ClCompile Include="Vision\Miscellaneous\StageDropsImageAnalyzer.cpp" />
|
||||
<ClCompile Include="Vision\Miscellaneous\OperImageAnalyzer.cpp" />
|
||||
<ClCompile Include="Vision\Miscellaneous\OperBoxImageAnalyzer.cpp" />
|
||||
<ClCompile Include="Vision\MultiMatchImageAnalyzer.cpp" />
|
||||
<ClCompile Include="Vision\OcrImageAnalyzer.cpp" />
|
||||
<ClCompile Include="Vision\OcrWithFlagTemplImageAnalyzer.cpp" />
|
||||
|
||||
@@ -603,13 +603,13 @@
|
||||
<ClInclude Include="Controller\PlayToolsController.h">
|
||||
<Filter>源文件\Controller</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Task\Interface\OperTask.h">
|
||||
<ClInclude Include="Task\Interface\OperBoxTask.h">
|
||||
<Filter>源文件\Task\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Task\Miscellaneous\OperRecognitionTask.h">
|
||||
<ClInclude Include="Task\Miscellaneous\OperBoxRecognitionTask.h">
|
||||
<Filter>源文件\Task\Miscellaneous</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Vision\Miscellaneous\OperImageAnalyzer.h">
|
||||
<ClInclude Include="Vision\Miscellaneous\OperBoxImageAnalyzer.h">
|
||||
<Filter>源文件\Vision\Miscellaneous</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
@@ -1001,13 +1001,13 @@
|
||||
<ClCompile Include="Controller\PlayToolsController.cpp">
|
||||
<Filter>源文件\Controller</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Task\Interface\OperTask.cpp">
|
||||
<ClCompile Include="Task\Interface\OperBoxTask.cpp">
|
||||
<Filter>源文件\Task\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Task\Miscellaneous\OperRecognitionTask.cpp">
|
||||
<ClCompile Include="Task\Miscellaneous\OperBoxRecognitionTask.cpp">
|
||||
<Filter>源文件\Task\Miscellaneous</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Vision\Miscellaneous\OperImageAnalyzer.cpp">
|
||||
<ClCompile Include="Vision\Miscellaneous\OperBoxImageAnalyzer.cpp">
|
||||
<Filter>源文件\Vision\Miscellaneous</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
|
||||
15
src/MaaCore/Task/Interface/OperBoxTask.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "OperBoxTask.h"
|
||||
|
||||
#include "Task/Miscellaneous/OperBoxRecognitionTask.h"
|
||||
#include "Task/ProcessTask.h"
|
||||
|
||||
asst::OperBoxTask::OperBoxTask(const AsstCallback& callback, Assistant* inst) : InterfaceTask(callback, inst, TaskType)
|
||||
{
|
||||
auto enter_task = std::make_shared<ProcessTask>(m_callback, m_inst, TaskType);
|
||||
enter_task->set_tasks({ "OperBoxBegin" }).set_ignore_error(true);
|
||||
m_subtasks.emplace_back(enter_task);
|
||||
|
||||
auto recognition_task = std::make_shared<OperBoxRecognitionTask>(m_callback, m_inst, TaskType);
|
||||
recognition_task->set_retry_times(0);
|
||||
m_subtasks.emplace_back(recognition_task);
|
||||
}
|
||||
14
src/MaaCore/Task/Interface/OperBoxTask.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
#include "Task/InterfaceTask.h"
|
||||
|
||||
namespace asst
|
||||
{
|
||||
class OperBoxTask final : public InterfaceTask
|
||||
{
|
||||
public:
|
||||
inline static constexpr std::string_view TaskType = "OperBox";
|
||||
|
||||
OperBoxTask(const AsstCallback& callback, Assistant* inst);
|
||||
virtual ~OperBoxTask() override = default;
|
||||
};
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
#include "OperTask.h"
|
||||
|
||||
#include "Task/Miscellaneous/OperRecognitionTask.h"
|
||||
#include "Task/ProcessTask.h"
|
||||
|
||||
asst::OperTask::OperTask(const AsstCallback& callback, Assistant* inst) : InterfaceTask(callback, inst, TaskType)
|
||||
{
|
||||
auto enter_task = std::make_shared<ProcessTask>(m_callback, m_inst, TaskType);
|
||||
enter_task->set_tasks({ "OperatorBegin" }).set_ignore_error(true);
|
||||
m_subtasks.emplace_back(enter_task);
|
||||
|
||||
auto recognition_task = std::make_shared<OperRecognitionTask>(m_callback, m_inst, TaskType);
|
||||
recognition_task->set_retry_times(0);
|
||||
m_subtasks.emplace_back(recognition_task);
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
#pragma once
|
||||
#include "Task/InterfaceTask.h"
|
||||
|
||||
namespace asst
|
||||
{
|
||||
class OperTask final : public InterfaceTask
|
||||
{
|
||||
public:
|
||||
inline static constexpr std::string_view TaskType = "Oper";
|
||||
|
||||
OperTask(const AsstCallback& callback, Assistant* inst);
|
||||
virtual ~OperTask() override = default;
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "OperRecognitionTask.h"
|
||||
#include "OperBoxRecognitionTask.h"
|
||||
|
||||
#include "Utils/Ranges.hpp"
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
#include "Controller/Controller.h"
|
||||
#include "Task/ProcessTask.h"
|
||||
#include "Utils/Logger.hpp"
|
||||
#include "Vision/Miscellaneous/OperImageAnalyzer.h"
|
||||
#include "Vision/Miscellaneous/OperBoxImageAnalyzer.h"
|
||||
#include "Vision/OcrWithFlagTemplImageAnalyzer.h"
|
||||
#include <future>
|
||||
|
||||
bool asst::OperRecognitionTask::_run()
|
||||
bool asst::OperBoxRecognitionTask::_run()
|
||||
{
|
||||
LogTraceFunction;
|
||||
|
||||
@@ -19,13 +19,13 @@ bool asst::OperRecognitionTask::_run()
|
||||
callback_analyze_result(true);
|
||||
return oper;
|
||||
}
|
||||
bool asst::OperRecognitionTask::swipe_and_analyze()
|
||||
bool asst::OperBoxRecognitionTask::swipe_and_analyze()
|
||||
{
|
||||
LogTraceFunction;
|
||||
std::string current_page_last_oper_name = "";
|
||||
own_opers.clear();
|
||||
while (true) {
|
||||
OperImageAnalyzer analyzer(ctrler()->get_image());
|
||||
OperBoxImageAnalyzer analyzer(ctrler()->get_image());
|
||||
|
||||
auto future = std::async(std::launch::async, [&]() { swipe_page(); });
|
||||
|
||||
@@ -45,12 +45,12 @@ bool asst::OperRecognitionTask::swipe_and_analyze()
|
||||
return !own_opers.empty();
|
||||
}
|
||||
|
||||
void asst::OperRecognitionTask::swipe_page()
|
||||
void asst::OperBoxRecognitionTask::swipe_page()
|
||||
{
|
||||
ProcessTask(*this, { "OperatorSlowlySwipeToTheRight" }).run();
|
||||
ProcessTask(*this, { "OperBoxSlowlySwipeToTheRight" }).run();
|
||||
}
|
||||
|
||||
void asst::OperRecognitionTask::callback_analyze_result(bool done)
|
||||
void asst::OperBoxRecognitionTask::callback_analyze_result(bool done)
|
||||
{
|
||||
LogTraceFunction;
|
||||
// 获取所有干员名
|
||||
@@ -76,7 +76,7 @@ void asst::OperRecognitionTask::callback_analyze_result(bool done)
|
||||
callback(AsstMsg::SubTaskExtraInfo, info);
|
||||
}
|
||||
|
||||
std::unordered_set<std::string> asst::OperRecognitionTask::get_own_oper_names()
|
||||
std::unordered_set<std::string> asst::OperBoxRecognitionTask::get_own_oper_names()
|
||||
{
|
||||
LogTraceFunction;
|
||||
std::unordered_set<std::string> own_oper_names;
|
||||
@@ -1,16 +1,16 @@
|
||||
#pragma once
|
||||
#include "Common/AsstBattleDef.h"
|
||||
#include "Task/AbstractTask.h"
|
||||
#include "Vision/Miscellaneous/OperImageAnalyzer.h"
|
||||
#include "Vision/Miscellaneous/OperBoxImageAnalyzer.h"
|
||||
#include <unordered_set>
|
||||
|
||||
namespace asst
|
||||
{
|
||||
class OperRecognitionTask : public AbstractTask
|
||||
class OperBoxRecognitionTask : public AbstractTask
|
||||
{
|
||||
public:
|
||||
using AbstractTask::AbstractTask;
|
||||
virtual ~OperRecognitionTask() override = default;
|
||||
virtual ~OperBoxRecognitionTask() override = default;
|
||||
|
||||
protected:
|
||||
virtual bool _run() override;
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "OperImageAnalyzer.h"
|
||||
#include "OperBoxImageAnalyzer.h"
|
||||
|
||||
#include "Utils/NoWarningCV.h"
|
||||
|
||||
@@ -12,19 +12,19 @@
|
||||
#include <Vision/OcrWithFlagTemplImageAnalyzer.h>
|
||||
#include <numbers>
|
||||
|
||||
bool asst::OperImageAnalyzer::analyze()
|
||||
bool asst::OperBoxImageAnalyzer::analyze()
|
||||
{
|
||||
LogTraceFunction;
|
||||
current_page_opers.clear();
|
||||
bool oper = analyzer_opers();
|
||||
bool oper_box = analyzer_opers();
|
||||
#ifdef ASST_DEBUG
|
||||
m_image_draw = m_image_draw_oper;
|
||||
#endif
|
||||
save_img(utils::path("debug") / utils::path("oper"));
|
||||
return oper;
|
||||
return oper_box;
|
||||
}
|
||||
|
||||
bool asst::OperImageAnalyzer::analyzer_opers()
|
||||
bool asst::OperBoxImageAnalyzer::analyzer_opers()
|
||||
{
|
||||
std::vector<asst::TextRect> oper_names_result;
|
||||
oper_names_result.clear();
|
||||
@@ -32,7 +32,7 @@ bool asst::OperImageAnalyzer::analyzer_opers()
|
||||
|
||||
OcrWithFlagTemplImageAnalyzer oper_name_analyzer(m_image);
|
||||
|
||||
oper_name_analyzer.set_task_info("OperatorNameFlagLV", "OperatorOCRLV");
|
||||
oper_name_analyzer.set_task_info("OperBoxFlagLV", "OperBoxNameOCR");
|
||||
oper_name_analyzer.set_replace(ocr_replace->replace_map, ocr_replace->replace_full);
|
||||
oper_name_analyzer.analyze();
|
||||
|
||||
@@ -7,15 +7,18 @@ namespace asst
|
||||
struct OperBoxInfo
|
||||
{
|
||||
std::string name;
|
||||
std::string id;
|
||||
int level = 0; //等级
|
||||
int elite = 0; //精英度
|
||||
};
|
||||
class OperImageAnalyzer final : public AbstractImageAnalyzer
|
||||
class OperBoxImageAnalyzer final : public AbstractImageAnalyzer
|
||||
{
|
||||
public:
|
||||
static constexpr size_t NPos = ~0ULL;
|
||||
|
||||
public:
|
||||
using AbstractImageAnalyzer::AbstractImageAnalyzer;
|
||||
virtual ~OperImageAnalyzer() override = default;
|
||||
virtual ~OperBoxImageAnalyzer() override = default;
|
||||
|
||||
virtual bool analyze() override;
|
||||
|
||||
@@ -567,7 +567,7 @@ namespace MaaWpfGui.Main
|
||||
|| unique_finished_task == (_latestTaskId.TryGetValue(TaskType.RecruitCalc, out var recruitCalcTaskId) ? recruitCalcTaskId : 0)
|
||||
|| unique_finished_task == (_latestTaskId.TryGetValue(TaskType.CloseDown, out var closeDownTaskId) ? closeDownTaskId : 0)
|
||||
|| unique_finished_task == (_latestTaskId.TryGetValue(TaskType.Depot, out var depotTaskId) ? depotTaskId : 0)
|
||||
|| unique_finished_task == (_latestTaskId.TryGetValue(TaskType.Oper, out var operTaskId) ? operTaskId : 0))
|
||||
|| unique_finished_task == (_latestTaskId.TryGetValue(TaskType.OperBox, out var operBoxTaskId) ? operBoxTaskId : 0))
|
||||
{
|
||||
isMainTaskQueueAllCompleted = false;
|
||||
}
|
||||
@@ -822,9 +822,9 @@ namespace MaaWpfGui.Main
|
||||
_recognizerViewModel.DepotParse((JObject)subTaskDetails);
|
||||
}
|
||||
|
||||
if (taskChain == "Oper")
|
||||
if (taskChain == "OperBox")
|
||||
{
|
||||
_recognizerViewModel.OperParse((JObject)subTaskDetails);
|
||||
_recognizerViewModel.OperBoxParse((JObject)subTaskDetails);
|
||||
}
|
||||
|
||||
string what = details["what"].ToString();
|
||||
@@ -1255,7 +1255,7 @@ namespace MaaWpfGui.Main
|
||||
Copilot,
|
||||
VideoRec,
|
||||
Depot,
|
||||
Oper,
|
||||
OperBox,
|
||||
}
|
||||
|
||||
private readonly Dictionary<TaskType, AsstTaskId> _latestTaskId = new Dictionary<TaskType, AsstTaskId>();
|
||||
@@ -1657,11 +1657,11 @@ namespace MaaWpfGui.Main
|
||||
/// 干员识别。
|
||||
/// </summary>
|
||||
/// <returns>是否成功。</returns>
|
||||
public bool AsstStartOper()
|
||||
public bool AsstStartOperBox()
|
||||
{
|
||||
var task_params = new JObject();
|
||||
AsstTaskId id = AsstAppendTaskWithEncoding("Oper", task_params);
|
||||
_latestTaskId[TaskType.Oper] = id;
|
||||
AsstTaskId id = AsstAppendTaskWithEncoding("OperBox", task_params);
|
||||
_latestTaskId[TaskType.OperBox] = id;
|
||||
return id != 0 && AsstStart();
|
||||
}
|
||||
|
||||
|
||||
@@ -379,9 +379,9 @@
|
||||
<!-- Depot Recognition -->
|
||||
|
||||
<!-- 干员识别 -->
|
||||
<system:String x:Key="OperRecognition">干员识别 Tool beta</system:String>
|
||||
<system:String x:Key="OperRecognitionTip">该功能尚处于测试阶段,干员列表请用稀有度和等级排序,若统计有误,欢迎打包 debug/oper 文件后向我们提交issue ~</system:String>
|
||||
<system:String x:Key="BeganToOperRecognition">开始识别</system:String>
|
||||
<system:String x:Key="OperBoxRecognition">干员识别 beta</system:String>
|
||||
<system:String x:Key="OperBoxRecognitionTip">该功能尚处于测试阶段,干员列表请用稀有度和等级排序,若统计有误,欢迎打包 debug/oper 文件后向我们提交issue ~</system:String>
|
||||
<system:String x:Key="BeganToOperBoxRecognition">开始识别</system:String>
|
||||
<!-- 干员识别 -->
|
||||
|
||||
<!-- Logs -->
|
||||
|
||||
@@ -380,9 +380,9 @@
|
||||
<!-- 倉庫アイテム認識 -->
|
||||
|
||||
<!-- 干员识别 -->
|
||||
<system:String x:Key="OperRecognition">干员识别 beta</system:String>
|
||||
<system:String x:Key="OperRecognitionTip">该功能尚处于测试阶段,干员列表请用稀有度和等级排序,若统计有误,欢迎打包 debug/oper 文件后向我们提交issue ~</system:String>
|
||||
<system:String x:Key="BeganToOperRecognition">开始识别</system:String>
|
||||
<system:String x:Key="OperBoxRecognition">干员识别 beta</system:String>
|
||||
<system:String x:Key="OperBoxRecognitionTip">该功能尚处于测试阶段,干员列表请用稀有度和等级排序,若统计有误,欢迎打包 debug/oper 文件后向我们提交issue ~</system:String>
|
||||
<system:String x:Key="BeganToOperBoxRecognition">开始识别</system:String>
|
||||
<!-- 干员识别 -->
|
||||
|
||||
<!-- ログ -->
|
||||
|
||||
@@ -360,9 +360,9 @@
|
||||
<!-- 창고 정리 -->
|
||||
|
||||
<!-- 干员识别 -->
|
||||
<system:String x:Key="OperRecognition">干员识别 beta</system:String>
|
||||
<system:String x:Key="OperRecognitionTip">该功能尚处于测试阶段,干员列表请用稀有度和等级排序,若统计有误,欢迎打包 debug/oper 文件后向我们提交issue ~</system:String>
|
||||
<system:String x:Key="BeganToOperRecognition">开始识别</system:String>
|
||||
<system:String x:Key="OperBoxRecognition">干员识别 beta</system:String>
|
||||
<system:String x:Key="OperBoxRecognitionTip">该功能尚处于测试阶段,干员列表请用稀有度和等级排序,若统计有误,欢迎打包 debug/oper 文件后向我们提交issue ~</system:String>
|
||||
<system:String x:Key="BeganToOperBoxRecognition">开始识别</system:String>
|
||||
<!-- 干员识别 -->
|
||||
|
||||
<!-- 로그 -->
|
||||
|
||||
@@ -382,9 +382,9 @@
|
||||
<!-- 仓库识别 -->
|
||||
|
||||
<!-- 干员识别 -->
|
||||
<system:String x:Key="OperRecognition">干员识别 beta</system:String>
|
||||
<system:String x:Key="OperRecognitionTip">该功能尚处于测试阶段,干员列表请用稀有度和等级排序,若统计有误,欢迎打包 debug/oper 文件后向我们提交issue ~</system:String>
|
||||
<system:String x:Key="BeganToOperRecognition">开始识别</system:String>
|
||||
<system:String x:Key="OperBoxRecognition">干员识别 beta</system:String>
|
||||
<system:String x:Key="OperBoxRecognitionTip">该功能尚处于测试阶段,干员列表请用稀有度和等级排序,若统计有误,欢迎打包 debug/oper 文件后向我们提交issue ~</system:String>
|
||||
<system:String x:Key="BeganToOperBoxRecognition">开始识别</system:String>
|
||||
<!-- 干员识别 -->
|
||||
|
||||
<!-- 日志 -->
|
||||
|
||||
@@ -314,9 +314,9 @@
|
||||
<!-- 倉庫識別 -->
|
||||
|
||||
<!-- 干员识别 -->
|
||||
<system:String x:Key="OperRecognition">干员识别 beta</system:String>
|
||||
<system:String x:Key="OperRecognitionTip">该功能尚处于测试阶段,干员列表请用稀有度和等级排序,若统计有误,欢迎打包 debug/oper 文件后向我们提交issue ~</system:String>
|
||||
<system:String x:Key="BeganToOperRecognition">开始识别</system:String>
|
||||
<system:String x:Key="OperBoxRecognition">干员识别 beta</system:String>
|
||||
<system:String x:Key="OperBoxRecognitionTip">该功能尚处于测试阶段,干员列表请用稀有度和等级排序,若统计有误,欢迎打包 debug/oper 文件后向我们提交issue ~</system:String>
|
||||
<system:String x:Key="BeganToOperBoxRecognition">开始识别</system:String>
|
||||
<!-- 干员识别 -->
|
||||
|
||||
<!-- 日誌 -->
|
||||
|
||||
@@ -336,7 +336,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Oper
|
||||
#region OperBox
|
||||
|
||||
/// <summary>
|
||||
/// 未实装干员,但在battle_data中,
|
||||
@@ -356,23 +356,23 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
"阿米娅-WARRIOR",
|
||||
};
|
||||
|
||||
private string _operInfo = LocalizationHelper.GetString("OperRecognitionTip");
|
||||
private string _operBoxInfo = LocalizationHelper.GetString("OperBoxRecognitionTip");
|
||||
|
||||
public string OperInfo
|
||||
public string OperBoxInfo
|
||||
{
|
||||
get => _operInfo;
|
||||
set => SetAndNotify(ref _operInfo, value);
|
||||
get => _operBoxInfo;
|
||||
set => SetAndNotify(ref _operBoxInfo, value);
|
||||
}
|
||||
|
||||
private string _operResult;
|
||||
private string _operBoxResult;
|
||||
|
||||
public string OperResult
|
||||
public string OperBoxResult
|
||||
{
|
||||
get => _operResult;
|
||||
set => SetAndNotify(ref _operResult, value);
|
||||
get => _operBoxResult;
|
||||
set => SetAndNotify(ref _operBoxResult, value);
|
||||
}
|
||||
|
||||
public bool OperParse(JObject details)
|
||||
public bool OperBoxParse(JObject details)
|
||||
{
|
||||
string result = string.Empty;
|
||||
/*已拥有干员*/
|
||||
@@ -390,14 +390,11 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
int count = 0;
|
||||
foreach (var name in operNotOwn)
|
||||
{
|
||||
if (count++ < 3)
|
||||
result += name + "\t";
|
||||
if (count++ == 3)
|
||||
{
|
||||
result += name + ", ";
|
||||
}
|
||||
else
|
||||
{
|
||||
result += name + "\n\t";
|
||||
count = 0;
|
||||
result += "\n";
|
||||
count= 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,60 +402,57 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
count = 0;
|
||||
foreach (var name in operOwn)
|
||||
{
|
||||
if (count++ < 3)
|
||||
result += name + "\t";
|
||||
if (count++ == 3)
|
||||
{
|
||||
result += name + ", ";
|
||||
}
|
||||
else
|
||||
{
|
||||
result += name + "\n\t";
|
||||
result += "\n";
|
||||
count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
OperResult = result;
|
||||
OperBoxResult = result;
|
||||
bool done = (bool)details["done"];
|
||||
if (done)
|
||||
{
|
||||
OperInfo = LocalizationHelper.GetString("IdentificationCompleted") + "\n" + LocalizationHelper.GetString("OperRecognitionTip");
|
||||
OperDone = true;
|
||||
OperBoxInfo = LocalizationHelper.GetString("IdentificationCompleted") + "\n" + LocalizationHelper.GetString("OperBoxRecognitionTip");
|
||||
OperBoxDone = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool _operdone = false;
|
||||
private bool _operBoxDone = false;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether depot info is parsed.
|
||||
/// </summary>
|
||||
public bool OperDone
|
||||
public bool OperBoxDone
|
||||
{
|
||||
get => _operdone;
|
||||
set => SetAndNotify(ref _operdone, value);
|
||||
get => _operBoxDone;
|
||||
set => SetAndNotify(ref _operBoxDone, value);
|
||||
}
|
||||
|
||||
private void ClearResult()
|
||||
{
|
||||
OperResult = string.Empty;
|
||||
OperDone = false;
|
||||
OperBoxResult = string.Empty;
|
||||
OperBoxDone = false;
|
||||
}
|
||||
|
||||
public async void StartOper()
|
||||
public async void StartOperBox()
|
||||
{
|
||||
string errMsg = string.Empty;
|
||||
OperInfo = LocalizationHelper.GetString("ConnectingToEmulator");
|
||||
OperBoxInfo = LocalizationHelper.GetString("ConnectingToEmulator");
|
||||
bool caught = await Task.Run(() => _asstProxy.AsstConnect(ref errMsg));
|
||||
if (!caught)
|
||||
{
|
||||
OperInfo = errMsg;
|
||||
OperBoxInfo = errMsg;
|
||||
return;
|
||||
}
|
||||
|
||||
OperInfo = LocalizationHelper.GetString("Identifying");
|
||||
OperBoxInfo = LocalizationHelper.GetString("Identifying");
|
||||
ClearResult();
|
||||
|
||||
_asstProxy.AsstStartOper();
|
||||
_asstProxy.AsstStartOperBox();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="{DynamicResource OperRecognition}">
|
||||
<TabItem Header="{DynamicResource OperBoxRecognition}">
|
||||
<Grid
|
||||
Margin="20,0,20,20">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -196,13 +196,13 @@
|
||||
VerticalAlignment="Top"
|
||||
FontSize="14"
|
||||
Style="{StaticResource TextBlockDefaultBold}"
|
||||
Text="{Binding OperInfo}"
|
||||
Text="{Binding OperBoxInfo}"
|
||||
TextWrapping="Wrap"/>
|
||||
<controls:TextBlock
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
FontSize="14"
|
||||
Text="{Binding OperResult}"
|
||||
Text="{Binding OperBoxResult}"
|
||||
TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
|
||||
@@ -219,8 +219,8 @@
|
||||
Margin="482,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Command="{s:Action StartOper}"
|
||||
Content="{DynamicResource BeganToOperRecognition}"
|
||||
Command="{s:Action StartOperBox}"
|
||||
Content="{DynamicResource BeganToOperBoxRecognition}"
|
||||
/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||