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

Commit

Permalink
fix: add warning about unrecommond methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed May 25, 2023
1 parent cac8ec3 commit 592b4e8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
18 changes: 16 additions & 2 deletions RotationSolver.Basic/Rotations/CustomRotation_OtherInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public abstract partial class CustomRotation
/// <summary>
/// The level of the player.
/// </summary>
[Obsolete("Please use EnoughLevel of action or trait instead.", true)]
protected static byte Level => (byte)ECommons.GameHelpers.Player.Level;

/// <summary>
Expand Down Expand Up @@ -164,6 +165,7 @@ public abstract partial class CustomRotation

/// <summary>
/// Check for GCD Record.
/// <br>WARNING: Do Not make this method the main of your rotation.</br>
/// </summary>
/// <param name="isAdjust">Check for adjust id not raw id.</param>
/// <param name="actions">True if any of this is matched.</param>
Expand All @@ -173,6 +175,7 @@ protected static bool IsLastGCD(bool isAdjust, params IAction[] actions)

/// <summary>
/// Check for GCD Record.
/// <br>WARNING: Do Not make this method the main of your rotation.</br>
/// </summary>
/// <param name="ids">True if any of this is matched.</param>
/// <returns></returns>
Expand All @@ -181,6 +184,7 @@ protected static bool IsLastGCD(params ActionID[] ids)

/// <summary>
/// Check for ability Record.
/// <br>WARNING: Do Not make this method the main of your rotation.</br>
/// </summary>
/// <param name="isAdjust">Check for adjust id not raw id.</param>
/// <param name="actions">True if any of this is matched.</param>
Expand All @@ -190,6 +194,7 @@ protected static bool IsLastAbility(bool isAdjust, params IAction[] actions)

/// <summary>
/// Check for ability Record.
/// <br>WARNING: Do Not make this method the main of your rotation.</br>
/// </summary>
/// <param name="ids">True if any of this is matched.</param>
/// <returns></returns>
Expand All @@ -198,6 +203,7 @@ protected static bool IsLastAbility(params ActionID[] ids)

/// <summary>
/// Check for action Record.
/// <br>WARNING: Do Not make this method the main of your rotation.</br>
/// </summary>
/// <param name="isAdjust">Check for adjust id not raw id.</param>
/// <param name="actions">True if any of this is matched.</param>
Expand All @@ -207,6 +213,7 @@ protected static bool IsLastAction(bool isAdjust, params IAction[] actions)

/// <summary>
/// Check for action Record.
/// <br>WARNING: Do Not make this method the main of your rotation.</br>
/// </summary>
/// <param name="ids">True if any of this is matched.</param>
/// <returns></returns>
Expand Down Expand Up @@ -234,16 +241,23 @@ protected static bool EndAfter(float remain, float remainNeed)

/// <summary>
/// Whether the battle lasted less than <paramref name="time"/> seconds
/// <br>WARNING: Do Not make this method the main of your rotation.</br>
/// </summary>
/// <param name="time">time in second.</param>
/// <returns></returns>
public static bool CombatElapsedLess(float time)
protected static bool CombatElapsedLess(float time)
{
if (!InCombat) return true;
return (DataCenter.CombatTime + DataCenter.WeaponRemain).IsLessThan(time);
}

public static bool CombatElapsedLessGCD(int GCD) => CombatElapsedLess(GCD * DataCenter.WeaponTotal);

/// <summary>
/// <br>WARNING: Do Not make this method the main of your rotation.</br>
/// </summary>
/// <param name="GCD"></param>
/// <returns></returns>
protected static bool CombatElapsedLessGCD(int GCD) => CombatElapsedLess(GCD * DataCenter.WeaponTotal);

public MethodInfo[] AllLast => GetType().GetStaticBoolMethodInfo(m =>
{
Expand Down
1 change: 0 additions & 1 deletion RotationSolver/UI/RotationConfigWindow_Debug.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ private void DrawNextAction()
ImGui.Text("Ability Remain: " + DataCenter.AbilityRemain.ToString());
ImGui.Text("Action Remain: " + DataCenter.ActionRemain.ToString());
ImGui.Text("Weapon Remain: " + DataCenter.WeaponRemain.ToString());
ImGui.Text("Elapsed: " + CustomRotation.CombatElapsedLess(10).ToString());
ImGui.Text("Time: " + (DataCenter.CombatTime + DataCenter.WeaponRemain).ToString());

ActionUpdater.NextAction?.Display(false);
Expand Down

0 comments on commit 592b4e8

Please sign in to comment.