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

Commit

Permalink
fix: add more info in debug tab.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Feb 2, 2023
1 parent 7d5103f commit c96224d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion RotationSolver/Helpers/StatusHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ internal static class StatusHelper
StatusID.Holmgang, StatusID.WillDead, StatusID.WalkingDead,
};

public static bool NeedHealing(BattleChara p) => p.WillStatusEndGCD(2, 0, false, NoNeedHealingStatus);
public static bool NeedHealing(this BattleChara p) => p.WillStatusEndGCD(2, 0, false, NoNeedHealingStatus);

/// <summary>
/// Will any of <paramref name="statusIDs"/> be end after <paramref name="gcdCount"/> gcds and <paramref name="abilityCount"/> abilities?
Expand Down
12 changes: 2 additions & 10 deletions RotationSolver/Updaters/TargetUpdater_Friends.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,10 @@ internal static partial class TargetUpdater
[EditorBrowsable(EditorBrowsableState.Never)]
internal static bool CanHealSingleSpell { get; private set; } = false;

/// <summary>
/// 有宠物
/// </summary>
internal static bool HavePet { get; private set; } = false;

/// <summary>
/// 有陆行鸟
/// </summary>
internal static bool HaveChocobo { get; private set; } = false;
/// <summary>
/// 血量没有满
/// </summary>

internal static bool HPNotFull { get; private set; } = false;

private static IEnumerable<BattleChara> GetPartyMembers(IEnumerable<BattleChara> allTargets)
Expand Down Expand Up @@ -186,7 +178,7 @@ static int ShouldHealSingle(StatusID[] hotStatus, float healSingle, float hotSub
var ratio = GetHealingOfTimeRatio(p, hotStatus);

var h = p.GetHealthRatio();
if (h == 0 || !StatusHelper.NeedHealing(p)) return false;
if (h == 0 || !p.NeedHealing()) return false;

return h < healSingle - hotSubSingle * ratio;
});
Expand Down
20 changes: 14 additions & 6 deletions RotationSolver/Windows/RotationConfigWindow_Debug.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,29 @@ private unsafe void DrawDebugTab()
ImGui.SetNextItemWidth(ImGui.CalcTextSize(str).X + 10);
ImGui.InputText("That is your HASH", ref str, 100);

ImGui.Text("Friends: " + TargetUpdater.PartyMembers.Count().ToString());
if ((IntPtr)FateManager.Instance() != IntPtr.Zero)
{
ImGui.Text("Fate: " + TargetUpdater.FateId.ToString());
}

if (ImGui.CollapsingHeader("Status"))
{
if ((IntPtr)FateManager.Instance() != IntPtr.Zero)
{
ImGui.Text("Fate: " + TargetUpdater.FateId.ToString());
}

foreach (var status in Service.ClientState.LocalPlayer.StatusList)
{
var source = Service.ObjectTable.SearchById(status.SourceId)?.Name ?? "None";
ImGui.Text($"{status.GameData.Name}: {status.StatusId} From: {source}");
}
}

if (ImGui.CollapsingHeader("Party"))
{
ImGui.Text("Friends: " + TargetUpdater.PartyMembers.Count().ToString());
ImGui.Text("CanHealSingleAbility: " + TargetUpdater.CanHealSingleAbility.ToString());
ImGui.Text("CanHealSingleSpell: " + TargetUpdater.CanHealSingleSpell.ToString());
ImGui.Text("CanHealAreaAbility: " + TargetUpdater.CanHealAreaAbility.ToString());
ImGui.Text("CanHealAreaSpell: " + TargetUpdater.CanHealAreaSpell.ToString());
}

if (ImGui.CollapsingHeader("Target Data"))
{
if (Service.TargetManager.Target is BattleChara b)
Expand Down

0 comments on commit c96224d

Please sign in to comment.