diff --git a/ActionTimelineEx/Helpers/DrawHelper.cs b/ActionTimelineEx/Helpers/DrawHelper.cs index dba7b1a..f7d91b9 100644 --- a/ActionTimelineEx/Helpers/DrawHelper.cs +++ b/ActionTimelineEx/Helpers/DrawHelper.cs @@ -1,4 +1,4 @@ -using Dalamud.Interface.Internal; +using Dalamud.Interface.Textures.TextureWraps; using ECommons.DalamudServices; using ECommons.ImGuiMethods; using ImGuiNET; @@ -26,7 +26,7 @@ public static void Init() array[i + 3] = imageData[i + 3]; } - _roundTex = Svc.PluginInterface.UiBuilder.LoadImageRaw(array, tex!.Header.Width, tex!.Header.Height, 4); + _roundTex = Svc.Texture.CreateFromRaw(new Dalamud.Interface.Textures.RawImageSpecification(tex!.Header.Width, tex!.Header.Height, 4), array); } public static void DrawDamage(this ImDrawListPtr drawList, Vector2 position, float size, uint lightCol) diff --git a/ActionTimelineEx/Localization/Localization.json b/ActionTimelineEx/Localization/Localization.json index 0cd308b..f0ea35b 100644 --- a/ActionTimelineEx/Localization/Localization.json +++ b/ActionTimelineEx/Localization/Localization.json @@ -1,5 +1,5 @@ { - "ActionTimelineEx.DescriptionAboutCommand": "Opens the ActionTimeline configuration window.", + "ActionTimelineEx.DescriptionAboutCommand": "Opens the ActionTimelineEx configuration window.", "ActionTimeline.SettingsName.Record": "Record Data", "ActionTimeline.SettingsName.ShowTimelineOnlyInDuty": "Show Only In Duty", "ActionTimeline.SettingsName.ShowTimelineOnlyInCombat": "Show Only In Combat", @@ -8,6 +8,7 @@ "ActionTimeline.SettingsName.SayClipping": "Say Clipping Time", "ActionTimeline.SettingsName.ClippintTime": "Clipping Range", "ActionTimeline.SettingsName.RecordTargetStatus": "Record Target Status", + "ActionTimeline.SettingsName.ShowDonate": "Show the donate link.", "ActionTimelineEx.Configurations.DrawingSettingsName.Name": "The timeline Name", "ActionTimelineEx.Configurations.DrawingSettingsName.Enable": "Enable", "ActionTimelineEx.Configurations.DrawingSettingsName.IsRotation": "Is Rotation", @@ -81,6 +82,8 @@ "ActionTimelineEx.Configurations.UiString.Wait": "Please wait for a second.", "ActionTimelineEx.Configurations.UiString.Confirm": "Are you sure to remove this timeline?", "ActionTimelineEx.Configurations.UiString.Remove": "Click to remove this timeline.", + "ActionTimelineEx.Configurations.UiString.AddOne": "Add One Timeline", + "ActionTimelineEx.Configurations.UiString.RemoveDesc": "Remove this Item:", "XIVConfigUI.LocalString.Search_Result": "Search Result", "XIVConfigUI.LocalString.Searching": "Search... ", "XIVConfigUI.LocalString.Search": "Search", @@ -94,12 +97,5 @@ "XIVConfigUI.Attributes.ConfigUnitType.Degree": "Angle Unit, in degrees.", "XIVConfigUI.Attributes.ConfigUnitType.Yalms": "Distance Unit, in yalms.", "XIVConfigUI.Attributes.ConfigUnitType.Percent": "Ratio Unit, as percentage.", - "XIVConfigUI.Attributes.ConfigUnitType.Pixels": "Display Unit, in pixels.", - "ActionTimelineEx.Punchline": "Show your actions in real-time.", - "ActionTimeline.Windows.SettingsWindow+TimelineItem": "ActionTimeline.Windows.SettingsWindow+TimelineItem", - "ActionTimelineEx.Description": "Configurable timeline display of all the actions you use.", - "ActionTimelineEx.Configurations.UiString.AddOne": "Add One Timeline", - "ActionTimelineEx.Configurations.UiString.RemoveDesc": "Remove this Item:", - "ActionTimeline.Windows.SettingsWindow+AddOne": "AddOne", - "ActionTimeline.Windows.SettingsWindow+ChangeLog": "ChangeLog" + "XIVConfigUI.Attributes.ConfigUnitType.Pixels": "Display Unit, in pixels." } \ No newline at end of file diff --git a/ActionTimelineEx/Plugin.cs b/ActionTimelineEx/Plugin.cs index cb3bba5..fcd20db 100644 --- a/ActionTimelineEx/Plugin.cs +++ b/ActionTimelineEx/Plugin.cs @@ -63,7 +63,7 @@ public class Plugin : IDalamudPlugin private static WindowSystem _windowSystem = null!; private static SettingsWindow _settingsWindow = null!; - public Plugin(DalamudPluginInterface pluginInterface) + public Plugin(IDalamudPluginInterface pluginInterface) { ECommonsMain.Init(pluginInterface, this); XIVConfigUIMain.Init(pluginInterface, "/atle", "Opens the ActionTimelineEx configuration window.", PluginCommand, typeof(Settings), typeof(DrawingSettings), typeof(GroupItem), typeof(UiString)); @@ -101,7 +101,6 @@ public void Dispose() Svc.PluginInterface.UiBuilder.Draw -= Draw; Svc.PluginInterface.UiBuilder.OpenConfigUi -= OpenConfigUi; Svc.PluginInterface.UiBuilder.OpenMainUi -= OpenConfigUi; - Svc.PluginInterface.UiBuilder.RebuildFonts(); GC.SuppressFinalize(this); } diff --git a/ActionTimelineEx/Timeline/StatusLineItem.cs b/ActionTimelineEx/Timeline/StatusLineItem.cs index b7b505c..25b1c87 100644 --- a/ActionTimelineEx/Timeline/StatusLineItem.cs +++ b/ActionTimelineEx/Timeline/StatusLineItem.cs @@ -1,6 +1,7 @@ using ActionTimeline.Helpers; using ActionTimelineEx.Configurations; using Dalamud.Interface.Internal; +using Dalamud.Interface.Textures.TextureWraps; using ImGuiNET; using System.Numerics; diff --git a/ActionTimelineEx/Timeline/TimelineItem.cs b/ActionTimelineEx/Timeline/TimelineItem.cs index 9e61979..9718533 100644 --- a/ActionTimelineEx/Timeline/TimelineItem.cs +++ b/ActionTimelineEx/Timeline/TimelineItem.cs @@ -2,6 +2,7 @@ using ActionTimelineEx.Configurations; using Dalamud.Interface; using Dalamud.Interface.Internal; +using Dalamud.Interface.Textures.TextureWraps; using ImGuiNET; using System.Numerics; diff --git a/ActionTimelineEx/Timeline/TimelineManager.cs b/ActionTimelineEx/Timeline/TimelineManager.cs index 0c1de6d..9290111 100644 --- a/ActionTimelineEx/Timeline/TimelineManager.cs +++ b/ActionTimelineEx/Timeline/TimelineManager.cs @@ -208,9 +208,9 @@ private void ActionFromSelf(ActionEffectSet set) if (!Player.Available) return; #if DEBUG - //Svc.Chat.Print($"Id: {set.Header.ActionID}; {set.Header.ActionType}; Source: {set.Source.ObjectId}"); + //Svc.Chat.Print($"Id: {set.Header.ActionID}; {set.Header.ActionType}; Source: {set.Source.EntityId}"); #endif - if (set.Source.ObjectId != Player.Object.ObjectId || !Plugin.Settings.Record) return; + if (set.Source.EntityId != Player.Object.EntityId || !Plugin.Settings.Record) return; DamageType damage = DamageType.None; SortedSet<(uint, string?)> statusGain = [], statusLose = []; @@ -219,7 +219,7 @@ private void ActionFromSelf(ActionEffectSet set) { var effect = set.TargetEffects[i]; var recordTarget = Plugin.Settings.RecordTargetStatus - || effect.TargetID == Player.Object.ObjectId; + || effect.TargetID == Player.Object.EntityId; if (effect[0].type is ActionEffectType.Damage or ActionEffectType.Heal) { @@ -339,10 +339,10 @@ private async void AddStatusLine(TimelineItem? effectItem, ulong targetId) } } - var statusList = Player.Object.StatusList.Where(s => s.SourceId == Player.Object.ObjectId); - if (Svc.Objects.SearchById(targetId) is BattleChara b) + var statusList = Player.Object.StatusList.Where(s => s.SourceId == Player.Object.EntityId); + if (Svc.Objects.SearchById(targetId) is IBattleChara b) { - statusList = statusList.Union(b.StatusList.Where(s => s.SourceId == Player.Object.ObjectId)); + statusList = statusList.Union(b.StatusList.Where(s => s.SourceId == Player.Object.EntityId)); } await Task.Delay(950); @@ -375,9 +375,9 @@ private async void OnActorControl(uint entityId, ActorControlCategory type, uint try { - if (entityId != Player.Object?.ObjectId) return; + if (entityId != Player.Object?.EntityId) return; - var record = Plugin.Settings.Record && sourceId == Player.Object?.ObjectId; + var record = Plugin.Settings.Record && sourceId == Player.Object?.EntityId; switch (type) { @@ -386,7 +386,7 @@ private async void OnActorControl(uint entityId, ActorControlCategory type, uint break; case ActorControlCategory.LoseEffect when record: - var stack = Player.Object?.StatusList.FirstOrDefault(s => s.StatusId == buffID && s.SourceId == Player.Object.ObjectId)?.StackCount ?? 0; + var stack = Player.Object?.StatusList.FirstOrDefault(s => s.StatusId == buffID && s.SourceId == Player.Object.EntityId)?.StackCount ?? 0; var icon = GetStatusIcon((ushort)buffID, false, out var name, ++stack); if (icon == 0) break; @@ -441,7 +441,7 @@ private unsafe void OnCast(uint sourceId, IntPtr ptr) try { - if (sourceId != Player.Object?.ObjectId || !Plugin.Settings.Record) return; + if (sourceId != Player.Object?.EntityId || !Plugin.Settings.Record) return; var actionId = *(ushort*)ptr; diff --git a/ActionTimelineEx/Windows/SettingsWindow.cs b/ActionTimelineEx/Windows/SettingsWindow.cs index 61bbf89..8f8bcff 100644 --- a/ActionTimelineEx/Windows/SettingsWindow.cs +++ b/ActionTimelineEx/Windows/SettingsWindow.cs @@ -5,6 +5,7 @@ using Dalamud.Interface.Colors; using Dalamud.Interface.GameFonts; using Dalamud.Interface.Internal; +using Dalamud.Interface.Textures.TextureWraps; using Dalamud.Interface.Utility; using ECommons.Commands; using ECommons.DalamudServices; diff --git a/ECommons b/ECommons index 91ff997..733ecbc 160000 --- a/ECommons +++ b/ECommons @@ -1 +1 @@ -Subproject commit 91ff997a57e9e57eac94f6c7f8b5bcc8c0dd4426 +Subproject commit 733ecbcd9c6d13e08a4d0bda7f5f2f7d6327eca2 diff --git a/XIVConfigUI b/XIVConfigUI index 4ce2db4..0dc6c23 160000 --- a/XIVConfigUI +++ b/XIVConfigUI @@ -1 +1 @@ -Subproject commit 4ce2db49d6d16d2f6e5051f60193558b335ef73c +Subproject commit 0dc6c233be10d21b77d9104d94cf7f4f062d9832