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

Commit

Permalink
fix: fixed with Invincible Status.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed May 3, 2023
1 parent 8687bfc commit c24e105
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 12 deletions.
19 changes: 14 additions & 5 deletions Resources/AnimationLockTime.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"181": 0.6,
"185": 0.1,
"190": 0.1,
"260": 0.6,
"266": 0.6,
"3545": 0.6,
"3546": 0.6,
Expand All @@ -79,15 +80,15 @@
"3593": 0.6,
"3594": 0.1,
"3595": 0.6,
"3596": 0.1,
"3596": 0.6,
"3598": 0.1,
"3599": 0.6,
"3600": 0.1,
"3600": 0.6,
"3601": 0.1,
"3603": 0.6,
"3603": 0.1,
"3606": 0.6,
"3608": 0.6,
"3610": 0.6,
"3610": 0.1,
"3612": 0.6,
"3613": 0.6,
"3614": 0.6,
Expand All @@ -99,6 +100,8 @@
"4404": 0.6,
"4405": 0.6,
"4406": 0.6,
"4574": 0.6,
"4639": 0.6,
"4868": 2.1,
"7386": 0.6,
"7387": 0.6,
Expand Down Expand Up @@ -183,12 +186,17 @@
"16542": 0.6,
"16552": 0.6,
"16553": 0.6,
"16926": 0.1,
"17215": 0.1,
"19002": 0.6,
"19004": 0.6,
"19010": 0.6,
"19012": 0.6,
"19297": 0.6,
"20243": 0.1,
"20542": 2.1,
"21054": 2.1,
"22411": 1.1,
"22605": 2.1,
"24283": 0.1,
"24284": 0.1,
Expand Down Expand Up @@ -245,5 +253,6 @@
"25865": 0.1,
"25870": 0.6,
"25885": 0.6,
"31323": 2.1
"31323": 2.1,
"33041": 2.1
}
11 changes: 11 additions & 0 deletions Resources/HostileCastingArea.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
[
1365,
2375,
2398,
3416,
4116,
4126,
4135,
4149,
4162,
8023,
8024,
8025,
Expand All @@ -17,6 +24,10 @@
26451,
27742,
28446,
28474,
28476,
28493,
28495,
28512,
28528,
29818,
Expand Down
1 change: 1 addition & 0 deletions Resources/InvincibleStatus.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[
151,
198,
469,
3012
]
2 changes: 1 addition & 1 deletion RotationSolver/TextureItems/StatusTexture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ internal class StatusTexture : ITexture
public StatusID ID => (StatusID)_status.RowId;
public string Name => $"{_status.Name} ({_status.RowId})";

public string Description => string.Empty;
public string Description => _status.Description?.ToString();

public bool IsEnabled { get; set; } = true;

Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/UI/ImGuiHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ internal static void SearchCombo<T>(string popId, string name, ref string search

internal static void SearchItems<T>(ref string searchTxt, IEnumerable<T> data, Action<T> selectAction) where T : ITexture
{
SearchItems(ref searchTxt, data, i => i.Name, selectAction, i => ImGui.Image(i.GetTexture().ImGuiHandle, new Vector2(24, 24)));
SearchItems(ref searchTxt, data, i => i.Name, selectAction, i => ImGui.Image(i.GetTexture().ImGuiHandle, new Vector2(24, 24)), texture => texture.Description);
}

internal static void SearchItemsReflection<T>(string popId, string name, ref string searchTxt, T[] actions, Action<T> selectAction) where T : MemberInfo
Expand Down
8 changes: 6 additions & 2 deletions RotationSolver/UI/RotationConfigWindow_Debug.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,18 @@ private unsafe void DrawParty()

private unsafe void DrawTargetData()
{
if(Service.TargetManager.Target != null)
{
ImGui.Text("Kind: " + Service.TargetManager.Target.GetObjectKind().ToString());
ImGui.Text("SubKind: " + Service.TargetManager.Target.GetBattleNPCSubKind().ToString());

}
if (Service.TargetManager.Target is BattleChara b)
{
ImGui.Text("HP: " + b.CurrentHp + " / " + b.MaxHp);
ImGui.Text("Is Boss: " + b.IsBoss().ToString());
ImGui.Text("Has Positional: " + b.HasPositional().ToString());
ImGui.Text("Is Dying: " + b.IsDying().ToString());
ImGui.Text("Kind: " + b.GetObjectKind().ToString());
ImGui.Text("SubKind: " + b.GetBattleNPCSubKind().ToString());
ImGui.Text("EventType: " + b.GetEventType().ToString());
ImGui.Text("NamePlate: " + b.GetNamePlateIcon().ToString());
ImGui.Text("StatusFlags: " + b.StatusFlags.ToString());
Expand Down
6 changes: 4 additions & 2 deletions RotationSolver/UI/RotationConfigWindow_List.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static StatusTexture[] AllInvStatus
if (_allInvStatus == null)
{
_allInvStatus = Service.GetSheet<Status>()
.Where(s => !s.CanDispel && !s.LockMovement && !s.IsPermanent && !s.IsGaze && !s.IsFcBuff && s.HitEffect.Row == 16 && s.ClassJobCategory.Row == 1 && s.StatusCategory == 1
.Where(s => !s.CanDispel && !s.LockMovement && !s.IsGaze && !s.IsFcBuff && s.HitEffect.Row == 16 && s.ClassJobCategory.Row == 1 && s.StatusCategory == 1
&& !string.IsNullOrEmpty(s.Name.ToString()) && s.Icon != 0)
.Select(s => new StatusTexture(s))
.ToArray();
Expand Down Expand Up @@ -121,7 +121,7 @@ private void DrawListTab()
_territoryId = 0;
}

ImGuiHelper.SearchItems(ref searchText, AllTerritories, s =>
ImGuiHelper.SearchItems(ref searchText, AllTerritories, s =>
{
_territoryId = s.ID;
});
Expand Down Expand Up @@ -319,6 +319,7 @@ private void DrawDangerousStatus()
{
var status = Service.GetSheet<Status>().GetRow(statusId);
ImGui.Image(IconSet.GetTexture(status.Icon).ImGuiHandle, new Vector2(24, 30));
ImGuiHelper.HoveredString(status.Description?.ToString());

ImGui.SameLine();
ImGuiHelper.Spacing();
Expand Down Expand Up @@ -363,6 +364,7 @@ private void DrawInvincibility()
{
var status = Service.GetSheet<Status>().GetRow(statusId);
ImGui.Image(IconSet.GetTexture(status.Icon).ImGuiHandle, new Vector2(24, 30));
ImGuiHelper.HoveredString(status.Description?.ToString());

ImGui.SameLine();
ImGuiHelper.Spacing();
Expand Down
1 change: 0 additions & 1 deletion RotationSolver/Updaters/InputUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ internal static unsafe void UpdateCommand()
if (Service.Conditions[ConditionFlag.OccupiedInQuestEvent]
|| Service.Conditions[ConditionFlag.Occupied33]
|| Service.Conditions[ConditionFlag.Occupied38]
|| Service.Conditions[ConditionFlag.Jumping61]
|| Service.Conditions[ConditionFlag.BetweenAreas]
|| Service.Conditions[ConditionFlag.BetweenAreas51]
|| Service.Conditions[ConditionFlag.Mounted]
Expand Down

0 comments on commit c24e105

Please sign in to comment.