From e7d76cdae150dfe4e2c821b9d73ea85d4df54fae Mon Sep 17 00:00:00 2001 From: Ayu0K Date: Sat, 4 Jan 2025 22:21:04 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20=E4=BF=AE=E6=94=B9PickAroundHandler?= =?UTF-8?q?=EF=BC=8C=E7=9B=B4=E6=8E=A5=E4=BD=BF=E7=94=A8KeyBindings?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AutoPathing/Handler/PickAroundHandler.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/BetterGenshinImpact/GameTask/AutoPathing/Handler/PickAroundHandler.cs b/BetterGenshinImpact/GameTask/AutoPathing/Handler/PickAroundHandler.cs index 818883eb..e4a6b373 100644 --- a/BetterGenshinImpact/GameTask/AutoPathing/Handler/PickAroundHandler.cs +++ b/BetterGenshinImpact/GameTask/AutoPathing/Handler/PickAroundHandler.cs @@ -47,7 +47,7 @@ public class PickAroundHandler() : IActionHandler public async Task MoveCircle(double edgeT, int n) { - Simulation.SendInput.Keyboard.KeyDown(User32.VK.VK_A); + Simulation.SendInput.Keyboard.KeyDown(TaskContext.Instance().Config.KeyBindingsConfig.MoveLeft.ToVK()); await Delay(30, _ct); while (n-- > 0) { @@ -55,7 +55,7 @@ public class PickAroundHandler() : IActionHandler await Delay((int)Math.Round(edgeT), _ct); } - Simulation.SendInput.Keyboard.KeyUp(User32.VK.VK_A); + Simulation.SendInput.Keyboard.KeyUp(TaskContext.Instance().Config.KeyBindingsConfig.MoveLeft.ToVK()); await Delay(200, _ct); } @@ -67,9 +67,9 @@ public class PickAroundHandler() : IActionHandler await Delay(500, _ct); if (ms > 0) { - Simulation.SendInput.Keyboard.KeyDown(User32.VK.VK_W); + Simulation.SendInput.Keyboard.KeyDown(TaskContext.Instance().Config.KeyBindingsConfig.MoveForward.ToVK()); await Delay(ms, _ct); - Simulation.SendInput.Keyboard.KeyUp(User32.VK.VK_W); + Simulation.SendInput.Keyboard.KeyUp(TaskContext.Instance().Config.KeyBindingsConfig.MoveForward.ToVK()); await Delay(200, _ct); } } @@ -80,8 +80,8 @@ public class PickAroundHandler() : IActionHandler double y = oldRadius * Math.Sin(angle); Simulation.SendInput.Mouse.MiddleButtonClick(); await Delay(500, _ct); - await MoveAfterTurn(User32.VK.VK_S, (int)Math.Round(y) + 200); - await MoveAfterTurn(User32.VK.VK_A, (int)Math.Round(x)); + await MoveAfterTurn(TaskContext.Instance().Config.KeyBindingsConfig.MoveBackward.ToVK(), (int)Math.Round(y) + 200); + await MoveAfterTurn(TaskContext.Instance().Config.KeyBindingsConfig.MoveLeft.ToVK(), (int)Math.Round(x)); } }