Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: blm and some input stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Mar 19, 2023
1 parent 4769cf4 commit a0dce2e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion RotationSolver.Default/Magical/BLM_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected override bool GeneralGCD(out IAction act)
if (InFireOrIce(out act, out var mustGo)) return true;
if (mustGo) return false;
//Triplecast for moving.
if (IsMoving && Triplecast.CanUse(out act, emptyOrSkipCombo: true)) return true;
if (IsMoving && HasHostilesInRange && Triplecast.CanUse(out act, emptyOrSkipCombo: true)) return true;

if (AddElementBase(out act)) return true;
if (Scathe.CanUse(out act)) return true;
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/UI/ControlWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public override void Draw()

ImGui.Columns(1);

if(Service.Config.ControlShowCooldown && RotationUpdater.RightNowRotation!= null)
if(MajorUpdater.IsValid && Service.Config.ControlShowCooldown && RotationUpdater.RightNowRotation!= null)
{
ImGui.Separator();
foreach (var pair in RotationUpdater.AllGroupedActions)
Expand Down
8 changes: 4 additions & 4 deletions RotationSolver/Updaters/InputUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ private static void KeyDown(KeyRecord key)
if (Service.Config.KeyState.ContainsValue(key))
{
Service.CommandManager.ProcessCommand(Service.Config.KeyState
.First(k => k.Value == key && k.Key != 0).Key.GetCommandStr());
.FirstOrDefault(k => k.Value == key && k.Key != StateCommandType.None).Key.GetCommandStr());
}

if (Service.Config.KeySpecial.ContainsValue(key))
{
Service.CommandManager.ProcessCommand(Service.Config.KeySpecial
.First(k => k.Value == key && k.Key != 0).Key.GetCommandStr());
.FirstOrDefault(k => k.Value == key && k.Key != SpecialCommandType.None).Key.GetCommandStr());
}
}

Expand Down Expand Up @@ -135,13 +135,13 @@ private static void ButtonDown(ButtonRecord button)
if (Service.Config.ButtonState.ContainsValue(button))
{
Service.CommandManager.ProcessCommand(Service.Config.ButtonState
.First(k => k.Value == button && k.Key != 0).Key.GetCommandStr());
.FirstOrDefault(k => k.Value == button && k.Key != StateCommandType.None).Key.GetCommandStr());
}

if (Service.Config.ButtonSpecial.ContainsValue(button))
{
Service.CommandManager.ProcessCommand(Service.Config.ButtonSpecial
.First(k => k.Value == button && k.Key != 0).Key.GetCommandStr());
.FirstOrDefault(k => k.Value == button && k.Key != SpecialCommandType.None).Key.GetCommandStr());
}
}
}
2 changes: 1 addition & 1 deletion RotationSolver/Updaters/MajorUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace RotationSolver.Updaters;

internal static class MajorUpdater
{
private static bool IsValid => Service.Conditions.Any() && Service.Player != null;
public static bool IsValid => Service.Conditions.Any() && Service.Player != null;

//#if DEBUG
// private static readonly Dictionary<int, bool> _valus = new Dictionary<int, bool>();
Expand Down

0 comments on commit a0dce2e

Please sign in to comment.