Skip to content

Commit

Permalink
fix some script bug
Browse files Browse the repository at this point in the history
  • Loading branch information
huiyadanli committed Jan 14, 2024
1 parent 4b5b8f9 commit d888a5f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion BetterGenshinImpact/GameTask/AutoFight/Model/Avatar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -454,11 +454,12 @@ public void Charge(int ms = 0)
{
return;
}

Simulation.SendInputEx.Mouse.MoveMouseBy(1000, 0);
ms -= 50;
Sleep(50, Cts);
}

AutoFightContext.Instance().Simulator.LeftButtonUp();
}
else
Expand Down
14 changes: 13 additions & 1 deletion BetterGenshinImpact/GameTask/AutoFight/Script/CombatCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,19 @@ public void Execute(CombatScenes combatScenes)
return;
}

avatar.Switch();
// 非宏类脚本,等待切换角色成功
if (Method != Method.Wait
&& Method != Method.MouseDown
&& Method != Method.MouseUp
&& Method != Method.Click
&& Method != Method.MoveBy
&& Method != Method.KeyDown
&& Method != Method.KeyUp
&& Method != Method.KeyPress)
{
avatar.Switch();
}

if (Method == Method.Skill)
{
var hold = Args != null && Args.Contains("hold");
Expand Down

0 comments on commit d888a5f

Please sign in to comment.