diff --git a/BetterGenshinImpact/Core/Simulator/Extensions/InputSimulatorExtension.cs b/BetterGenshinImpact/Core/Simulator/Extensions/InputSimulatorExtension.cs
index 59199161..fb18baf0 100644
--- a/BetterGenshinImpact/Core/Simulator/Extensions/InputSimulatorExtension.cs
+++ b/BetterGenshinImpact/Core/Simulator/Extensions/InputSimulatorExtension.cs
@@ -21,7 +21,7 @@ public static class InputSimulatorExtension
/// 按键类型
public static void SimulateAction(this InputSimulator self, GIActions action, KeyType type = KeyType.KeyPress)
{
- var key = SimulateKeyHelper.GetActionKey(action);
+ var key = action.ToActionKey();
switch (type)
{
case KeyType.KeyPress:
diff --git a/BetterGenshinImpact/Core/Simulator/Extensions/PostMessageSimulatorExtension.cs b/BetterGenshinImpact/Core/Simulator/Extensions/PostMessageSimulatorExtension.cs
index 4baf8dda..daa7faa9 100644
--- a/BetterGenshinImpact/Core/Simulator/Extensions/PostMessageSimulatorExtension.cs
+++ b/BetterGenshinImpact/Core/Simulator/Extensions/PostMessageSimulatorExtension.cs
@@ -20,7 +20,7 @@ public static class PostMessageSimulatorExtension
/// 按键类型
public static PostMessageSimulator SimulateAction(this PostMessageSimulator self, GIActions action, KeyType type = KeyType.KeyPress)
{
- var key = SimulateKeyHelper.GetActionKey(action);
+ var key = action.ToActionKey();
switch (type)
{
case KeyType.KeyPress:
@@ -122,7 +122,7 @@ public static class PostMessageSimulatorExtension
/// 按键类型
public static PostMessageSimulator SimulateActionBackground(this PostMessageSimulator self, GIActions action, KeyType type = KeyType.KeyPress)
{
- var key = SimulateKeyHelper.GetActionKey(action);
+ var key = action.ToActionKey();
switch (type)
{
case KeyType.KeyPress:
diff --git a/BetterGenshinImpact/GameTask/AutoFight/Model/Avatar.cs b/BetterGenshinImpact/GameTask/AutoFight/Model/Avatar.cs
index 95410b4a..c0fc7260 100644
--- a/BetterGenshinImpact/GameTask/AutoFight/Model/Avatar.cs
+++ b/BetterGenshinImpact/GameTask/AutoFight/Model/Avatar.cs
@@ -524,19 +524,19 @@ public class Avatar
User32.VK vk = User32.VK.VK_NONAME;
if (key == "w")
{
- vk = SimulateKeyHelper.GetActionKey(GIActions.MoveForward).ToVK();
+ vk = GIActions.MoveForward.ToActionKey().ToVK();
}
else if (key == "s")
{
- vk = SimulateKeyHelper.GetActionKey(GIActions.MoveBackward).ToVK();
+ vk = GIActions.MoveBackward.ToActionKey().ToVK();
}
else if (key == "a")
{
- vk = SimulateKeyHelper.GetActionKey(GIActions.MoveLeft).ToVK();
+ vk = GIActions.MoveLeft.ToActionKey().ToVK();
}
else if (key == "d")
{
- vk = SimulateKeyHelper.GetActionKey(GIActions.MoveRight).ToVK();
+ vk = GIActions.MoveRight.ToActionKey().ToVK();
}
if (vk == User32.VK.VK_NONAME)
diff --git a/BetterGenshinImpact/GameTask/AutoPathing/Handler/PickAroundHandler.cs b/BetterGenshinImpact/GameTask/AutoPathing/Handler/PickAroundHandler.cs
index 0c67820c..fb23a90e 100644
--- a/BetterGenshinImpact/GameTask/AutoPathing/Handler/PickAroundHandler.cs
+++ b/BetterGenshinImpact/GameTask/AutoPathing/Handler/PickAroundHandler.cs
@@ -81,8 +81,8 @@ public class PickAroundHandler() : IActionHandler
double y = oldRadius * Math.Sin(angle);
Simulation.SendInput.Mouse.MiddleButtonClick();
await Delay(500, _ct);
- await MoveAfterTurn(SimulateKeyHelper.GetActionKey(GIActions.MoveBackward).ToVK(), (int)Math.Round(y) + 200);
- await MoveAfterTurn(SimulateKeyHelper.GetActionKey(GIActions.MoveLeft).ToVK(), (int)Math.Round(x));
+ await MoveAfterTurn(GIActions.MoveBackward.ToActionKey().ToVK(), (int)Math.Round(y) + 200);
+ await MoveAfterTurn(GIActions.MoveLeft.ToActionKey().ToVK(), (int)Math.Round(x));
}
}