Merge pull request #3168 from MaaAssistantArknights/dev

Release v4.8.4
This commit is contained in:
MistEO
2022-12-23 00:08:09 +08:00
committed by GitHub
9 changed files with 116 additions and 50 deletions

View File

@@ -109,6 +109,7 @@
- 支持演习模式,不用一直浪费理智测试的
- 欢迎使用作业分享站 www.抄作业.com, www.prts.plus 分享自己的作业!
- 推荐在作业描述里填上你自己的名字(作者名)、参考的攻略视频 url, 其他想说的等等
- 欢迎与我们一起讨论作业制作等问题 作业企鹅群 [1169188429](https://jq.qq.com/?_wv=1027&k=QZcGcJ9G)
### 一键长草:获取信用及购物

View File

@@ -1451,6 +1451,27 @@
"Operator"
]
},
"InfrastEnterOperList": {
"text": [
"Morale",
"Resting",
"Working",
"Assign"
]
},
"Award": {
"roi": [
700,
530,
200,
130
]
},
"GoLastBattle": {
"text": [
"To the most recent stage"
]
},
"BattleStageName": {
"Doc": "该任务的 ocrReplace 被所有涉及Rouge-like的English识别任务复用",
"ocrReplace": [

View File

@@ -1481,35 +1481,35 @@
"远程位"
],
[
"前衛イ.*",
"前衛.*イ.*",
"近卫干员"
],
[
"医療イ.*",
"医療.*イ.*",
"医疗干员"
],
[
"先鋒イ.*",
"先鋒.*イ.*",
"先锋干员"
],
[
"術師イ.*",
"術師.*イ.*",
"术师干员"
],
[
"狙撃イ.*",
"狙撃.*イ.*",
"狙击干员"
],
[
"重装イ.*",
"重装.*イ.*",
"重装干员"
],
[
"補助イ.*",
"補助.*イ.*",
"辅助干员"
],
[
"特殊イ.*",
"特殊.*イ.*",
"特种干员"
],
[

View File

@@ -721,6 +721,10 @@
[
"“弦驚”",
"“弦惊”"
],
[
"澄閃",
"澄闪"
]
]
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -32,7 +32,7 @@ namespace MaaWpfGui
/// <returns>yj历时间的字符串表示形式</returns>
public static string GetYJTimeNowString()
{
return GetYJTimeNow().ToString();
return GetYJTimeNow().ToString("yyyy/MM/dd HH:mm:ss");
}
/// <summary>
@@ -50,7 +50,7 @@ namespace MaaWpfGui
/// <returns>yj历日期的字符串表示形式</returns>
public static string GetYJTimeDateString()
{
return GetYJTimeDate().ToString();
return GetYJTimeDate().ToString("yyyy/MM/dd HH:mm:ss");
}
/// <summary>

View File

@@ -495,6 +495,17 @@
<ItemGroup>
<Resource Include="newlogo.ico" />
</ItemGroup>
<ItemGroup>
<COMReference Include="IWshRuntimeLibrary">
<Guid>{F935DC20-1CF0-11D0-ADB9-00C04FD58A0B}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>xcopy /e /y /i /c "$(ProjectDir)..\..\3rdparty\tools" "$(TargetDir)"

View File

@@ -15,14 +15,15 @@ using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using IWshRuntimeLibrary;
using MaaWpfGui.MaaHotKeys;
using Newtonsoft.Json.Linq;
using Stylet;
using StyletIoC;
@@ -402,46 +403,74 @@ namespace MaaWpfGui
public void TryToStartEmulator(bool manual = false)
{
if ((EmulatorPath.Length == 0
|| !File.Exists(EmulatorPath))
|| !System.IO.File.Exists(EmulatorPath))
|| !(StartEmulator
|| manual))
{
return;
}
ProcessStartInfo startInfo;
if (EmulatorAddCommand.Length != 0)
{
startInfo = new ProcessStartInfo(EmulatorPath, EmulatorAddCommand);
}
else
{
startInfo = new ProcessStartInfo(EmulatorPath);
}
startInfo.UseShellExecute = false;
Process process = new Process
{
StartInfo = startInfo,
};
process.Start();
process.WaitForInputIdle();
if (MinimizingStartup)
{
for (int i = 0; !IsIconic(process.MainWindowHandle) && i < 5000; ++i)
{
ShowWindow(process.MainWindowHandle, SWMINIMIZE);
Thread.Sleep(1);
}
}
if (!int.TryParse(EmulatorWaitSeconds, out int delay))
{
delay = 60;
}
Thread.Sleep(delay * 1000);
try
{
string fileName;
string arguments;
ProcessStartInfo startInfo;
if (Path.GetExtension(EmulatorPath).ToLower() == ".lnk")
{
WshShell shell = new WshShell();
WshShortcut shortcut = (WshShortcut)shell.CreateShortcut(EmulatorPath);
fileName = shortcut.TargetPath;
arguments = shortcut.Arguments;
}
else
{
fileName = EmulatorPath;
arguments = EmulatorAddCommand;
}
if (arguments.Length != 0)
{
startInfo = new ProcessStartInfo(fileName, arguments);
}
else
{
startInfo = new ProcessStartInfo(fileName);
}
startInfo.UseShellExecute = false;
Process process = new Process
{
StartInfo = startInfo,
};
process.Start();
process.WaitForInputIdle();
if (MinimizingStartup)
{
for (int i = 0; !IsIconic(process.MainWindowHandle) && i < delay * 1000; ++i)
{
ShowWindow(process.MainWindowHandle, SWMINIMIZE);
Thread.Sleep(1);
}
}
}
catch (Exception)
{
if (EmulatorAddCommand.Length != 0)
{
Process.Start(EmulatorPath);
}
else
{
Process.Start(EmulatorPath, EmulatorAddCommand);
Thread.Sleep(delay * 1000);
}
}
}
/// <summary>
@@ -1070,7 +1099,7 @@ namespace MaaWpfGui
}
/* 访问好友设置 */
private string _lastCreditFightTaskTime = ViewStatusStorage.Get("Visit.LastCreditFightTaskTime", Utils.GetYJTimeDate().AddDays(-1).ToString());
private string _lastCreditFightTaskTime = ViewStatusStorage.Get("Visit.LastCreditFightTaskTime", Utils.GetYJTimeDate().AddDays(-1).ToString("yyyy/MM/dd HH:mm:ss"));
public string LastCreditFightTaskTime
{
@@ -1091,14 +1120,14 @@ namespace MaaWpfGui
{
get
{
if (DateTime.TryParse(LastCreditFightTaskTime, out DateTime lastCreditFightTaskTime))
try
{
if (Utils.GetYJTimeDate() > lastCreditFightTaskTime.Date)
if (Utils.GetYJTimeDate() > DateTime.ParseExact(_lastCreditFightTaskTime, "yyyy/MM/dd HH:mm:ss", CultureInfo.InvariantCulture))
{
return _creditFightTaskEnabled;
}
}
else
catch
{
return _creditFightTaskEnabled;
}
@@ -1934,13 +1963,13 @@ namespace MaaWpfGui
return;
}
if (!File.Exists(_bluestacksConfig))
if (!System.IO.File.Exists(_bluestacksConfig))
{
ViewStatusStorage.Set("Bluestacks.Config.Error", "File not exists");
return;
}
var all_lines = File.ReadAllLines(_bluestacksConfig);
var all_lines = System.IO.File.ReadAllLines(_bluestacksConfig);
foreach (var line in all_lines)
{
if (line.StartsWith(_bluestacksKeyWord))
@@ -1981,7 +2010,7 @@ namespace MaaWpfGui
public async void ReplaceADB()
{
if (!File.Exists(AdbPath))
if (!System.IO.File.Exists(AdbPath))
{
Execute.OnUIThread(() =>
{
@@ -1993,7 +2022,7 @@ namespace MaaWpfGui
return;
}
if (!File.Exists(GoogleAdbFilename))
if (!System.IO.File.Exists(GoogleAdbFilename))
{
var downloadTask = Task.Run(() =>
{
@@ -2022,7 +2051,7 @@ namespace MaaWpfGui
process.Kill();
}
File.Copy(AdbPath, AdbPath + ".bak", true);
System.IO.File.Copy(AdbPath, AdbPath + ".bak", true);
const string UnzipDir = "adb_unzip";
if (Directory.Exists(UnzipDir))
@@ -2031,7 +2060,7 @@ namespace MaaWpfGui
}
System.IO.Compression.ZipFile.ExtractToDirectory(GoogleAdbFilename, UnzipDir);
File.Copy(UnzipDir + "/platform-tools/adb.exe", AdbPath, true);
System.IO.File.Copy(UnzipDir + "/platform-tools/adb.exe", AdbPath, true);
Directory.Delete(UnzipDir, true);
});
await procTask;