mirror of
https://github.com/babalae/better-genshin-impact
synced 2025-01-08 11:57:53 +08:00
mod: 修改打开背包的方式
This commit is contained in:
parent
8822346f3b
commit
3b54844e6b
@ -10,6 +10,7 @@ using BetterGenshinImpact.Helpers.Extensions;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Vanara.PInvoke;
|
||||
using static BetterGenshinImpact.GameTask.Common.TaskControl;
|
||||
using BetterGenshinImpact.Core.Simulator.Extensions;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.Common.Job;
|
||||
|
||||
@ -25,7 +26,7 @@ public class ArtifactSalvageTask
|
||||
await _returnMainUiTask.Start(ct);
|
||||
|
||||
// B键打开背包
|
||||
Simulation.SendInput.Keyboard.KeyPress(User32.VK.VK_B);
|
||||
Simulation.SendInput.SimulateAction(GIActions.OpenInventory);
|
||||
await Delay(1000, ct);
|
||||
|
||||
var openBagSuccess = await NewRetry.WaitForAction(() =>
|
||||
@ -51,7 +52,7 @@ public class ArtifactSalvageTask
|
||||
if (Bv.IsInMainUi(ra))
|
||||
{
|
||||
Debug.WriteLine("背包打开失败,再次尝试打开背包");
|
||||
Simulation.SendInput.Keyboard.KeyPress(User32.VK.VK_B);
|
||||
Simulation.SendInput.SimulateAction(GIActions.OpenInventory);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user