From 7ef90e816c71283d2b64605469021e2934509321 Mon Sep 17 00:00:00 2001 From: Thomas Brooks <34015422+NostraThomas99@users.noreply.github.com> Date: Sun, 17 Nov 2024 01:34:29 -0600 Subject: [PATCH 1/4] Update ECommons --- ECommons | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ECommons b/ECommons index 9de6521..71ee09f 160000 --- a/ECommons +++ b/ECommons @@ -1 +1 @@ -Subproject commit 9de65215ec8aab18c350a3d0f75a9fdeca49ebdb +Subproject commit 71ee09f7cc2230a73503b945422760da1368405c From 237c9755c04994fe6c18353270b05e927f0f31eb Mon Sep 17 00:00:00 2001 From: Thomas Brooks <34015422+NostraThomas99@users.noreply.github.com> Date: Sun, 17 Nov 2024 01:40:30 -0600 Subject: [PATCH 2/4] Can we build it? Eh, not really... --- ActionTimelineEx/ActionTimelineEx.json | 2 +- ActionTimelineEx/Timeline/TimelineManager.cs | 23 ++++++++++---------- ActionTimelineEx/Windows/SettingsWindow.cs | 4 ++-- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/ActionTimelineEx/ActionTimelineEx.json b/ActionTimelineEx/ActionTimelineEx.json index 30c3af9..f37c1ea 100644 --- a/ActionTimelineEx/ActionTimelineEx.json +++ b/ActionTimelineEx/ActionTimelineEx.json @@ -12,7 +12,7 @@ "CategoryTags": [ "UI" ], - "DalamudApiLevel": 10, + "DalamudApiLevel": 11, "LoadRequiredState": 0, "LoadSync": false, "CanUnloadAsync": false, diff --git a/ActionTimelineEx/Timeline/TimelineManager.cs b/ActionTimelineEx/Timeline/TimelineManager.cs index 7f702e0..e7ff406 100644 --- a/ActionTimelineEx/Timeline/TimelineManager.cs +++ b/ActionTimelineEx/Timeline/TimelineManager.cs @@ -7,10 +7,10 @@ using ECommons.Hooks; using ECommons.Hooks.ActionEffectTypes; using FFXIVClientStructs.FFXIV.Client.Game; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; using RotationSolver.Basic.Data; -using Action = Lumina.Excel.GeneratedSheets.Action; -using Status = Lumina.Excel.GeneratedSheets.Status; +using Action = Lumina.Excel.Sheets.Action; +using Status = Lumina.Excel.Sheets.Status; namespace ActionTimeline.Timeline; @@ -166,9 +166,9 @@ private static TimelineItemType GetActionType(uint actionId, ActionType type) if (actionId == 3) return TimelineItemType.OGCD; //Sprint - var actionCate = (ActionCate)(action.ActionCategory.Value?.RowId ?? 0); + var actionCate = (ActionCate)(action.Value.ActionCategory.Value.RowId); - var isRealGcd = action.CooldownGroup == GCDCooldownGroup || action.AdditionalCooldownGroup == GCDCooldownGroup; + var isRealGcd = action.Value.CooldownGroup == GCDCooldownGroup || action.Value.AdditionalCooldownGroup == GCDCooldownGroup; return actionCate == ActionCate.AutoAttack ? TimelineItemType.AutoAttack : !isRealGcd && actionCate == ActionCate.Ability ? TimelineItemType.OGCD @@ -176,7 +176,7 @@ private static TimelineItemType GetActionType(uint actionId, ActionType type) case ActionType.Item: var item = Svc.Data.GetExcelSheet()?.GetRow(actionId); - return item?.CastTimes > 0 ? TimelineItemType.GCD : TimelineItemType.OGCD; + return item?.CastTimeSeconds > 0 ? TimelineItemType.GCD : TimelineItemType.OGCD; } return TimelineItemType.GCD; @@ -198,14 +198,14 @@ private static uint GetStatusIcon(ushort id, bool isGain, out string? name, byte if (Plugin.Settings.HideStatusIds.Contains(id)) return 0; var status = Svc.Data.GetExcelSheet()?.GetRow(id); if (status == null) return 0; - name = status.Name; + name = status.Value.Name.ToString(); ShowedStatusId.Add(id); - var icon = status.Icon; + var icon = status.Value.Icon; if (isGain) { - return icon + (uint)Math.Max(0, status.MaxStacks - 1); + return icon + (uint)Math.Max(0, status.Value.MaxStacks - 1); } else { @@ -364,8 +364,7 @@ private async void AddStatusLine(TimelineItem? effectItem, ulong targetId) foreach (var status in statusList) { - var icon = Svc.Data.GetExcelSheet()?.GetRow(status.StatusId)?.Icon; - if (icon == null) continue; + var icon = Svc.Data.GetExcelSheet().GetRow(status.StatusId).Icon; foreach (var item in list) { @@ -464,7 +463,7 @@ private unsafe void OnCast(uint sourceId, IntPtr ptr) AddItem(new TimelineItem() { - Name = action?.Name ?? string.Empty, + Name = action?.Name.ToString() ?? string.Empty, Icon = actionId == 4 ? (ushort)118 //Mount : action?.Icon ?? 0, StartTime = DateTime.Now, diff --git a/ActionTimelineEx/Windows/SettingsWindow.cs b/ActionTimelineEx/Windows/SettingsWindow.cs index 97b5e4c..25e7119 100644 --- a/ActionTimelineEx/Windows/SettingsWindow.cs +++ b/ActionTimelineEx/Windows/SettingsWindow.cs @@ -9,7 +9,7 @@ using ECommons.Commands; using ECommons.DalamudServices; using ImGuiNET; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; using System.Numerics; namespace ActionTimeline.Windows @@ -167,7 +167,7 @@ private void DrawGeneralSetting() if (texture != null) { ImGui.Image(texture.ImGuiHandle, new Vector2(24, 30)); - DrawHelper.SetTooltip(status?.Name ?? string.Empty); + DrawHelper.SetTooltip(status?.Name.ToString() ?? string.Empty); ImGui.SameLine(); } From a52a143ee0f8229fabdf41109e4fa08ff3ecf8dc Mon Sep 17 00:00:00 2001 From: Thomas Brooks <34015422+NostraThomas99@users.noreply.github.com> Date: Fri, 22 Nov 2024 19:53:11 -0600 Subject: [PATCH 3/4] Fix OnCast sig --- ActionTimelineEx/Timeline/TimelineManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ActionTimelineEx/Timeline/TimelineManager.cs b/ActionTimelineEx/Timeline/TimelineManager.cs index e7ff406..09144c5 100644 --- a/ActionTimelineEx/Timeline/TimelineManager.cs +++ b/ActionTimelineEx/Timeline/TimelineManager.cs @@ -74,7 +74,7 @@ protected void Dispose(bool disposing) private readonly Hook? _onActorControlHook = null; private delegate void OnCastDelegate(uint sourceId, IntPtr sourceCharacter); - [Signature("40 55 56 48 81 EC ?? ?? ?? ?? 48 8B EA", DetourName = nameof(OnCast))] + [Signature("40 56 41 56 48 81 EC ?? ?? ?? ?? 48 8B F2", DetourName = nameof(OnCast))] private readonly Hook? _onCastHook = null; public static SortedSet ShowedStatusId { get; } = []; From f70a41c30024eb36715bdb908e07a261b5453adf Mon Sep 17 00:00:00 2001 From: Thomas Brooks <34015422+NostraThomas99@users.noreply.github.com> Date: Fri, 22 Nov 2024 19:59:12 -0600 Subject: [PATCH 4/4] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 57833ab..fa6fb78 100644 --- a/manifest.json +++ b/manifest.json @@ -10,7 +10,7 @@ "CategoryTags": [ "UI" ], - "DalamudApiLevel": 10, + "DalamudApiLevel": 11, "LoadRequiredState": 0, "LoadSync": false, "CanUnloadAsync": false,