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

Commit

Permalink
fix: changed some ui default values.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 7, 2023
1 parent ad9bd34 commit 5d8c545
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 7 deletions.
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Actions/BaseAction_Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private bool TargetAreaFriend(float range, bool mustUse, PlayerCharacter player)
else
{
Vector3 directionToTank = attackT.Position - player.Position;
var MoveDirection = directionToTank / directionToTank.Length() * (disToTankRound - _action.EffectRange);
var MoveDirection = directionToTank / directionToTank.Length() * Math.Max(0, disToTankRound - _action.EffectRange);
_position = player.Position + MoveDirection;
}
}
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public class PluginConfiguration : IPluginConfiguration
public bool OnlyShowWithHostileOrInDuty = true;
public bool ShowControlWindow = false;
public bool IsControlWindowLock = false;
public bool ShowNextActionWindow = false;
public bool ShowNextActionWindow = true;
public bool IsInfoWindowNoInputs = false;
public bool IsInfoWindowNoMove = false;
public bool UseKeyboardCommand = false;
Expand Down
21 changes: 17 additions & 4 deletions RotationSolver.Default/Ranged/MCH_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ protected override bool AttackAbility(byte abilitiesRemaining, out IAction act)
}

if (!CombatElapsedLess(12) && CanUseHypercharge(out act)) return true;
if (!AirAnchorBlockTime(8)
&& RookAutoturret.CanUse(out act)) return true;
if (CanUseRookAutoturret(out act)) return true;

if (BarrelStabilizer.CanUse(out act)) return true;

Expand Down Expand Up @@ -106,6 +105,21 @@ private static bool AirAnchorBlockTime(float time)
}
}

private bool CanUseRookAutoturret(out IAction act)
{
act = null;
if (AirAnchor.EnoughLevel)
{
if (!AirAnchor.IsCoolingDown || AirAnchor.ElapsedAfter(10)) return false;
}
else
{
if (!HotShot.IsCoolingDown || HotShot.ElapsedAfter(10)) return false;
}

return RookAutoturret.CanUse(out act);
}

const float REST_TIME = 6f;
private static bool CanUseHypercharge(out IAction act)
{
Expand Down Expand Up @@ -135,7 +149,6 @@ private static bool CanUseHypercharge(out IAction act)
if (Drill.EnoughLevel && Drill.WillHaveOneCharge(REST_TIME)) return false;
if (ChainSaw.EnoughLevel && ChainSaw.WillHaveOneCharge(REST_TIME)) return false;

if (Hypercharge.CanUse(out act)) return true;
return false;
return Hypercharge.CanUse(out act);
}
}
2 changes: 1 addition & 1 deletion RotationSolver/UI/ControlWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal class ControlWindow : Window
public ControlWindow()
: base(nameof(ControlWindow), BaseFlags)
{
Size = new Vector2(540f, 490f);
Size = new Vector2(540f, 300f);
SizeCondition = ImGuiCond.FirstUseEver;
}

Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/UI/RotationConfigWindow_Debug.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ private void DrawCDEX()

private unsafe void DrawIcon()
{
var A = new Vector3(3, 4, 0);
var B = new Vector3(6, 8, 0);
ImGui.Text(Vector3.Distance(B, A).ToString());
//var pointer = (AddonActionCross*) Service.GetAddon<AddonActionCross>();
//if (pointer != null)
//{
Expand Down

0 comments on commit 5d8c545

Please sign in to comment.