diff --git a/TickTracker/Configuration.cs b/TickTracker/Configuration.cs index 1acbebc..bb98254 100644 --- a/TickTracker/Configuration.cs +++ b/TickTracker/Configuration.cs @@ -48,6 +48,6 @@ public class Configuration : IPluginConfiguration public Vector4 GPNativeUiColor { get; set; } = new(0f, 0.570f, 0.855f, 1f); public Vector4 GPIconColor { get; set; } = new(1f, 1f, 1f, 1f); - public void Save(DalamudPluginInterface pi) => pi.SavePluginConfig(this); + public void Save(IDalamudPluginInterface pi) => pi.SavePluginConfig(this); } diff --git a/TickTracker/GlobalSuppressions.cs b/TickTracker/GlobalSuppressions.cs index a8f0cb2..97289b3 100644 --- a/TickTracker/GlobalSuppressions.cs +++ b/TickTracker/GlobalSuppressions.cs @@ -5,7 +5,7 @@ using System.Diagnostics.CodeAnalysis; [assembly: SuppressMessage("Design", "MA0038:Make method static (deprecated, use CA1822 instead)", Justification = "Obsolete", Scope = "member", Target = "~M:TickTracker.Helpers.Utilities.IsAddonReady(FFXIVClientStructs.FFXIV.Component.GUI.AtkUnitBase*)~System.Boolean")] -[assembly: SuppressMessage("Design", "MA0038:Make method static (deprecated, use CA1822 instead)", Justification = "Obsolete", Scope = "member", Target = "~M:TickTracker.Helpers.Utilities.IsTarget(Dalamud.Game.ClientState.Objects.SubKinds.PlayerCharacter,FFXIVClientStructs.FFXIV.Client.Game.Character.Character*)~System.Boolean")] +[assembly: SuppressMessage("Design", "MA0038:Make method static (deprecated, use CA1822 instead)", Justification = "Obsolete", Scope = "member", Target = "~M:TickTracker.Helpers.Utilities.IsTarget(Dalamud.Game.ClientState.Objects.SubKinds.IPlayerCharacter,FFXIVClientStructs.FFXIV.Client.Game.Character.Character*)~System.Boolean")] [assembly: SuppressMessage("Design", "MA0038:Make method static (deprecated, use CA1822 instead)", Justification = "Obsolete", Scope = "member", Target = "~M:TickTracker.Helpers.Utilities.AddonOverlap(FFXIVClientStructs.FFXIV.Component.GUI.AtkUnitBase*,TickTracker.Windows.BarWindowBase,System.Boolean)~System.Boolean")] [assembly: SuppressMessage("Design", "MA0038:Make method static (deprecated, use CA1822 instead)", Justification = "Obsolete", Scope = "member", Target = "~M:TickTracker.NativeNodes.ImageNode.FreeResources(FFXIVClientStructs.FFXIV.Component.GUI.AtkUldPartsList*[])~System.Void")] [assembly: SuppressMessage("Design", "MA0049:Type name should not match containing namespace", Justification = "...and I took that personally.", Scope = "type", Target = "~T:TickTracker.TickTracker")] diff --git a/TickTracker/Helpers/NativeUi.cs b/TickTracker/Helpers/NativeUi.cs index 368002f..78235d9 100644 --- a/TickTracker/Helpers/NativeUi.cs +++ b/TickTracker/Helpers/NativeUi.cs @@ -37,7 +37,7 @@ public static uint Get(string name, int index = 0) for (var i = 0; i < uldManager->NodeListCount; i++) { var n = uldManager->NodeList[i]; - if (n->NodeID != nodeId || (type != null && n->Type != type.Value)) + if (n->NodeId != nodeId || (type != null && n->Type != type.Value)) { continue; } diff --git a/TickTracker/Helpers/Utilities.cs b/TickTracker/Helpers/Utilities.cs index 41a25ff..c95f6b5 100644 --- a/TickTracker/Helpers/Utilities.cs +++ b/TickTracker/Helpers/Utilities.cs @@ -13,7 +13,7 @@ using Lumina.Excel.GeneratedSheets2; using FFXIVClientStructs.FFXIV.Component.GUI; using FFXIVClientStructs.FFXIV.Client.Game.Character; -using Dalamud; +using Dalamud.Game; using Dalamud.Plugin; using Dalamud.Plugin.Services; using Dalamud.Game.ClientState.Conditions; @@ -27,7 +27,7 @@ namespace TickTracker.Helpers; /// /// A class that contains different helper functions necessary for this plugin's operation /// -public partial class Utilities(DalamudPluginInterface _pluginInterface, +public partial class Utilities(IDalamudPluginInterface _pluginInterface, Configuration _config, ICondition _condition, IDataManager _dataManager, @@ -59,7 +59,7 @@ public partial class Utilities(DalamudPluginInterface _pluginInterface, /// public FrozenSet RegenNullKeywords { get; } = CreateFrozenSet("null", "nullified", "stop", "stopped"); - private readonly DalamudPluginInterface pluginInterface = _pluginInterface; + private readonly IDalamudPluginInterface pluginInterface = _pluginInterface; private readonly Configuration config = _config; private readonly ICondition condition = _condition; private readonly IDataManager dataManager = _dataManager; @@ -179,7 +179,7 @@ public bool InIgnoredInstances() { return false; } - return (TerritoryIntendedUseType)territory.TerritoryIntendedUse is TerritoryIntendedUseType.Diadem; + return (TerritoryIntendedUseType)territory.TerritoryIntendedUse.Row is TerritoryIntendedUseType.Diadem; } /// @@ -204,10 +204,10 @@ public unsafe bool IsAddonReady(AtkUnitBase* addon) /// /// Check if is currently targeting , whether it's manually set, or the result of using an action. /// - public unsafe bool IsTarget(PlayerCharacter targetCharacter, Character* sourceCharacter) + public unsafe bool IsTarget(IPlayerCharacter targetCharacter, Character* sourceCharacter) { - ITuple sourceTarget = (sourceCharacter->GetCastInfo()->CastTargetID, sourceCharacter->GetSoftTargetId().ObjectID, sourceCharacter->GetTargetId(), sourceCharacter->Gaze.Controller.GazesSpan[0].TargetInfo.TargetId.ObjectID); - var targetID = (object)targetCharacter.ObjectId; + ITuple sourceTarget = (sourceCharacter->GetCastInfo()->TargetId.ObjectId, sourceCharacter->GetSoftTargetId().ObjectId, sourceCharacter->GetTargetId(), sourceCharacter->LookAt.Controller.Params[0].TargetParam.TargetId.ObjectId); + var targetID = (object)targetCharacter.EntityId; for (var i = 0; i < sourceTarget.Length; i++) { var sourceTargetID = sourceTarget[i]; diff --git a/TickTracker/IPC/PenumbraApi.cs b/TickTracker/IPC/PenumbraApi.cs index d0713c3..4d32ceb 100644 --- a/TickTracker/IPC/PenumbraApi.cs +++ b/TickTracker/IPC/PenumbraApi.cs @@ -11,10 +11,10 @@ namespace TickTracker.IPC; -public sealed class PenumbraApi : IDisposable +/*public sealed class PenumbraApi : IDisposable { private readonly IPluginLog log; - private readonly DalamudPluginInterface pluginInterface; + private readonly IDalamudPluginInterface pluginInterface; private readonly ApiVersion apiVersion; private readonly GetEnabledState getEnabledState; @@ -58,7 +58,7 @@ private bool penumbraModsEnabled } } - public PenumbraApi(DalamudPluginInterface _pluginInterface, IPluginLog _pluginLog) + public PenumbraApi(IDalamudPluginInterface _pluginInterface, IPluginLog _pluginLog) { log = _pluginLog; pluginInterface = _pluginInterface; @@ -149,4 +149,4 @@ public void Dispose() init.Dispose(); disposed.Dispose(); } -} +}*/ diff --git a/TickTracker/NativeNodes/ImageNode.cs b/TickTracker/NativeNodes/ImageNode.cs index 0c1180d..8af3c40 100644 --- a/TickTracker/NativeNodes/ImageNode.cs +++ b/TickTracker/NativeNodes/ImageNode.cs @@ -16,7 +16,7 @@ namespace TickTracker.NativeNodes; public sealed unsafe class ImageNode : IDisposable { - public required uint NodeID { get; set; } + public required uint NodeId { get; set; } public NodeType Type { get; } = NodeType.Image; public NodeFlags NodeFlags { get; set; } = NodeFlags.AnchorTop | NodeFlags.AnchorLeft | NodeFlags.Enabled | NodeFlags.Visible | NodeFlags.EmitsEvents; public uint DrawFlags { get; set; } = 1; @@ -266,7 +266,7 @@ public void CreateCompleteImageNode(int partsListIndex, bool hqTexture = false, } imageNode->AtkResNode.Type = Type; - imageNode->AtkResNode.NodeID = NodeID; + imageNode->AtkResNode.NodeId = NodeId; imageNode->PartsList = atkPartsList; imageNode->PartId = 0; @@ -282,15 +282,15 @@ public void CreateCompleteImageNode(int partsListIndex, bool hqTexture = false, imageNodeParent = parent; NativeUi.LinkNodeAfterTargetNode(&imageNode->AtkResNode, parent->GetAsAtkComponentNode(), targetNode); } - nodePosition.X = imageNode->AtkResNode.GetX(); - nodePosition.Y = imageNode->AtkResNode.GetY(); + nodePosition.X = imageNode->AtkResNode.GetXFloat(); + nodePosition.Y = imageNode->AtkResNode.GetYFloat(); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SetNodePosition(float X, float Y) { - imageNode->AtkResNode.SetX(X); - imageNode->AtkResNode.SetY(Y); + imageNode->AtkResNode.SetXFloat(X); + imageNode->AtkResNode.SetYFloat(Y); } public void ResetNodePosition() @@ -300,8 +300,8 @@ public void ResetNodePosition() log.Error("Image node not initialised"); return; } - imageNode->AtkResNode.SetX(nodePosition.X); - imageNode->AtkResNode.SetY(nodePosition.Y); + imageNode->AtkResNode.SetXFloat(nodePosition.X); + imageNode->AtkResNode.SetYFloat(nodePosition.Y); } /// diff --git a/TickTracker/TickTracker.cs b/TickTracker/TickTracker.cs index e6c41b6..bcb8618 100644 --- a/TickTracker/TickTracker.cs +++ b/TickTracker/TickTracker.cs @@ -60,7 +60,7 @@ public sealed class TickTracker : IDalamudPlugin [Signature("48 89 5C 24 ?? 48 89 6C 24 ?? 56 48 83 EC 20 83 3D ?? ?? ?? ?? ?? 41 0F B6 E8 48 8B DA 8B F1 0F 84 ?? ?? ?? ?? 48 89 7C 24 ??", DetourName = nameof(ActorTickUpdate))] private readonly Hook? receiveActorUpdateHook = null; - private readonly DalamudPluginInterface pluginInterface; + private readonly IDalamudPluginInterface pluginInterface; private readonly Configuration config; private readonly Utilities utilities; private readonly IClientState clientState; @@ -100,11 +100,11 @@ public sealed class TickTracker : IDalamudPlugin private bool syncAvailable = true, nullSheet = true; private uint lastHPValue, lastMPValue, lastGPValue; private Task? loadingTask; - private PenumbraApi? penumbraApi; + //private PenumbraApi? penumbraApi; private unsafe AtkUnitBase* NameplateAddon => (AtkUnitBase*)gameGui.GetAddonByName("NamePlate"); private unsafe AtkUnitBase* ParamWidget => (AtkUnitBase*)gameGui.GetAddonByName("_ParameterWidget"); - public TickTracker(DalamudPluginInterface _pluginInterface, + public TickTracker(IDalamudPluginInterface _pluginInterface, IClientState _clientState, IFramework _framework, IGameGui _gameGui, @@ -135,16 +135,17 @@ public sealed class TickTracker : IDalamudPlugin throw new NotSupportedException("Hook not found in current game version. The plugin is non functional."); } receiveActorUpdateHook.Enable(); + cts = new CancellationTokenSource(); var tickerUld = pluginInterface.UiBuilder.LoadUld(ParamWidgetUldPath); primaryTickerNode = new ImageNode(_dataManager, log, tickerUld) { - NodeID = primaryTickerImageID, + NodeId = primaryTickerImageID, }; secondaryTickerNode = new ImageNode(_dataManager, log, tickerUld) { - NodeID = secondaryTickerImageID, + NodeId = secondaryTickerImageID, }; tickerUld.Dispose(); @@ -176,6 +177,7 @@ public sealed class TickTracker : IDalamudPlugin private void PenumbraCheck() { + /* try { var plo = pluginInterface.InstalledPlugins.SingleOrDefault(gon => gon.InternalName.Equals("Penumbra", StringComparison.Ordinal)); @@ -216,12 +218,13 @@ private void PenumbraCheck() log.Error("Penumbra IPC failed. {ex}", ex.Message); } } + */ } private void InitializeWindows() { DebugWindow = new DebugWindow(pluginInterface); - ConfigWindow = new ConfigWindow(pluginInterface, config, DebugWindow, penumbraApi); + ConfigWindow = new ConfigWindow(pluginInterface, config, DebugWindow);//, penumbraApi); HPBarWindow = new HPBar(clientState, log, utilities, config); MPBarWindow = new MPBar(clientState, log, utilities, config); GPBarWindow = new GPBar(clientState, log, utilities, config); @@ -259,7 +262,7 @@ private unsafe void InitializeResolution() private void OnFrameworkUpdate(IFramework _framework) { #if DEBUG - DevWindowThings(clientState?.LocalPlayer, (DateTime.UtcNow - DateTime.UnixEpoch).TotalSeconds, MPBarWindow); + DevWindowThings(clientState?.LocalPlayer, (DateTime.UtcNow - DateTime.UnixEpoch).TotalSeconds, barWindows); #endif if (clientState is { IsLoggedIn: false } or { IsPvPExcludingDen: true } || nullSheet) { @@ -310,7 +313,7 @@ private void OnFrameworkUpdate(IFramework _framework) UpdateBarState(player); } - private void ProcessTicks(double currentTime, PlayerCharacter player) + private void ProcessTicks(double currentTime, IPlayerCharacter player) { var statusList = player.StatusList.ToList(); // HP section @@ -456,16 +459,17 @@ private void ParseStatusSheet(IEnumerable /// HP = *(int*)packetData; /// MP = *((ushort*)packetData + 2); /// GP = *((short*)packetData + 3); // Goes up to 10000 and is tracked and updated at all times - private unsafe void ActorTickUpdate(uint objectId, uint* packetData, byte unkByte) + /// player.address + 0x2258 = accountId + private unsafe void ActorTickUpdate(uint entityId, uint* packetData, byte unkByte) { - receiveActorUpdateHook!.Original(objectId, packetData, unkByte); + receiveActorUpdateHook!.Original(entityId, packetData, unkByte); try { if (clientState is not { LocalPlayer: { } player }) { return; } - if (objectId != player.ObjectId) + if (entityId != player.EntityId) { return; } @@ -482,7 +486,7 @@ private unsafe void ActorTickUpdate(uint objectId, uint* packetData, byte unkByt } } - private unsafe void UpdateBarState(PlayerCharacter player) + private unsafe void UpdateBarState(IPlayerCharacter player) { var jobId = player.ClassJob.Id; var althideForMeleeRangedDPS = meleeAndRangedDPS.Contains(jobId); @@ -499,7 +503,7 @@ private unsafe void UpdateBarState(PlayerCharacter player) HPBarWindow.IsOpen = !config.LockBar || (shouldShowHPBar && config.HPVisible); MPBarWindow.IsOpen = !config.LockBar || (shouldShowMPBar && config.MPVisible && !hideForGPBar); GPBarWindow.IsOpen = !config.LockBar || (shouldShowGPBar && config.GPVisible); - if (penumbraAvailable && penumbraApi is not null && penumbraApi.NativeUiBanned) + /*if (penumbraAvailable && penumbraApi is not null && penumbraApi.NativeUiBanned) { if (primaryTickerNode.imageNode is not null) { @@ -510,7 +514,7 @@ private unsafe void UpdateBarState(PlayerCharacter player) secondaryTickerNode.DestroyNode(); } return; - } + }*/ if (utilities.IsAddonReady(ParamWidget) && ParamWidget->UldManager.LoadedState is AtkLoadState.Loaded && ParamWidget->IsVisible) { DrawNativePrimary(shouldShowHPBar); @@ -602,40 +606,31 @@ private unsafe void CheckBarCollision(AddonEvent type, AddonArgs args) } #if DEBUG - private unsafe void DevWindowThings(PlayerCharacter? player, double currentTime, BarWindowBase window) + private unsafe void DevWindowThings(IPlayerCharacter? player, double currentTime, FrozenSet windowList) { DevWindow.IsOpen = true; - if (penumbraAvailable && penumbraIpc is not null) + /*if (penumbraAvailable && penumbraApi is not null) { - DevWindow.Print(nameof(penumbraIpc.NativeUiBanned) + " is " + penumbraIpc.NativeUiBanned); - } - if (player is not null) + DevWindow.Print(nameof(penumbraApi.NativeUiBanned) + " is " + penumbraApi.NativeUiBanned); + }*/ + if (player is null) { - DevWindow.Print(window.WindowName + ": " + player.CurrentHp.ToString() + " / " + player.MaxHp.ToString()); - var shieldValue = player.ShieldPercentage * player.MaxHp / 100; - DevWindow.Print("Possible shield values for " + (player.Name.TextValue ?? "unknown") + " of " + shieldValue); - if (DevWindow.startBenchmark) - { - DevWindow.startBenchmark = false; - _ = Task.Run(() => DevWindow.BenchmarkSpawner(player, 1_000_000, healthRegenSet, disabledHealthRegenSet, manaRegenSet), cts.Token); - } - } - else if (DevWindow.startBenchmark) - { - DevWindow.startBenchmark = false; - log.Debug("Player and StatusManager is not available."); + return; } var cultureFormat = System.Globalization.CultureInfo.InvariantCulture; - DevWindow.Print($"Window open? {window.IsOpen}"); - DevWindow.Print("Current Time: " + currentTime.ToString(cultureFormat)); - DevWindow.Print("RegenActive: " + window.RegenActive.ToString()); - DevWindow.Print("Progress: " + window.Progress.ToString(cultureFormat)); - DevWindow.Print("NormalTick: " + window.Tick.ToString(cultureFormat)); - DevWindow.Print("NormalUpdate: " + window.TickUpdate.ToString()); - DevWindow.Print("Sync Value: " + syncValue.ToString(cultureFormat)); - DevWindow.Print("Regen Value: " + regenValue.ToString(cultureFormat)); - DevWindow.Print("Fast Value: " + fastValue.ToString(cultureFormat)); - DevWindow.Print("Swapchain resolution: " + Resolution.X.ToString(cultureFormat) + "x" + Resolution.Y.ToString(cultureFormat)); + foreach (var window in windowList) + { + DevWindow.Print($"{window.WindowName} open: {window.IsOpen}"); + DevWindow.Print("Current Time: " + currentTime.ToString(cultureFormat)); + DevWindow.Print("RegenActive: " + window.RegenActive.ToString()); + DevWindow.Print("Progress: " + window.Progress.ToString(cultureFormat)); + DevWindow.Print("NormalTick: " + window.Tick.ToString(cultureFormat)); + DevWindow.Print("NormalUpdate: " + window.TickUpdate.ToString()); + DevWindow.Print("Sync Value: " + syncValue.ToString(cultureFormat)); + DevWindow.Print("Regen Value: " + regenValue.ToString(cultureFormat)); + DevWindow.Print("Fast Value: " + fastValue.ToString(cultureFormat)); + DevWindow.Print("Swapchain resolution: " + Resolution.X.ToString(cultureFormat) + "x" + Resolution.Y.ToString(cultureFormat)); + } } #endif @@ -700,7 +695,7 @@ private unsafe void HandleNativeNode(in ImageNode tickerNode, uint gaugeBarNodeI { tickerNode.imageNode->AtkResNode.SetWidth(0); } - if (tickerNode.imageNode->AtkResNode.IsVisible) + if (tickerNode.imageNode->AtkResNode.IsVisible()) { tickerNode.imageNode->AtkResNode.ToggleVisibility(visibility); } @@ -741,7 +736,7 @@ private unsafe void HandleNativeNode(in ImageNode tickerNode, uint gaugeBarNodeI tickerNode.CreateCompleteImageNode(0, hq, gaugeBarNode, frameResNode); if (tickerNode.imageNode is null) { - log.Error("ImageNode {id} could not be created.", tickerNode.NodeID); + log.Error("ImageNode {id} could not be created.", tickerNode.NodeId); failed = true; return; } @@ -763,7 +758,7 @@ public void Dispose() #endif cts.Cancel(); cts.Dispose(); - penumbraApi?.Dispose(); + //penumbraApi?.Dispose(); receiveActorUpdateHook?.Disable(); receiveActorUpdateHook?.Dispose(); commandManager.RemoveHandler(CommandName); diff --git a/TickTracker/TickTracker.csproj b/TickTracker/TickTracker.csproj index 0d4611b..d51c46f 100644 --- a/TickTracker/TickTracker.csproj +++ b/TickTracker/TickTracker.csproj @@ -3,7 +3,7 @@ - 1.4.4.0 + 1.5.0.0 A plugin that keeps track of HP/MP/GP ticks. https://github.com/Kurochi51/TickTracker @@ -38,8 +38,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TickTracker/Windows/ConfigWindow.cs b/TickTracker/Windows/ConfigWindow.cs index 3e72deb..576c9fa 100644 --- a/TickTracker/Windows/ConfigWindow.cs +++ b/TickTracker/Windows/ConfigWindow.cs @@ -21,23 +21,23 @@ public class ConfigWindow : Window private readonly Vector4 defaultBlack = new(0f, 0f, 0f, 1f); // #000000 private readonly Vector4 defaultWhite = new(1f, 1f, 1f, 1f); // #FFFFFF - private readonly DalamudPluginInterface pluginInterface; + private readonly IDalamudPluginInterface pluginInterface; private readonly DebugWindow debugWindow; private readonly Configuration config; - private readonly PenumbraApi? penumbraApi; + //private readonly PenumbraApi? penumbraApi; private bool nativeDisabled; private const ImGuiColorEditFlags ColorEditFlags = ImGuiColorEditFlags.NoInputs | ImGuiColorEditFlags.AlphaPreviewHalf | ImGuiColorEditFlags.AlphaBar; - public ConfigWindow(DalamudPluginInterface _pluginInterface, Configuration _config, DebugWindow _debugWindow, PenumbraApi? _penumbraApi) : base("TickTracker Settings") + public ConfigWindow(IDalamudPluginInterface _pluginInterface, Configuration _config, DebugWindow _debugWindow/*, PenumbraApi? _penumbraApi*/) : base("TickTracker Settings") { Size = new Vector2(320, 390); Flags = ImGuiWindowFlags.NoResize; pluginInterface = _pluginInterface; config = _config; debugWindow = _debugWindow; - penumbraApi = _penumbraApi; + //penumbraApi = _penumbraApi; } public override void OnClose() @@ -47,7 +47,7 @@ public override void OnClose() public override void Draw() { - nativeDisabled = penumbraApi is not null && penumbraApi.NativeUiBanned; + nativeDisabled = false;//penumbraApi is not null && penumbraApi.NativeUiBanned; EditConfigProperty("Lock bar size and position", config, c => c.LockBar, (c, value) => c.LockBar = value, checkbox: true); using (var child = ImRaii.Child("TabBarChild", new Vector2(ImGui.GetContentRegionAvail().X, ImGui.GetContentRegionAvail().Y - (36f * ImGuiHelpers.GlobalScale)), border: false)) { diff --git a/TickTracker/Windows/DebugWindow.cs b/TickTracker/Windows/DebugWindow.cs index d6fd36c..e316b94 100644 --- a/TickTracker/Windows/DebugWindow.cs +++ b/TickTracker/Windows/DebugWindow.cs @@ -37,7 +37,7 @@ public sealed class DebugWindow : Window, IDisposable /// public ConcurrentDictionary DisabledManaRegenDictionary { get; set; } = new(); - private readonly DalamudPluginInterface pluginInterface; + private readonly IDalamudPluginInterface pluginInterface; private readonly CancellationTokenSource cts; private readonly CancellationToken cToken; @@ -50,7 +50,7 @@ public sealed class DebugWindow : Window, IDisposable private TableStruct disabledRegenTable, regenTable; private bool invalidList, fontChange, firstTime = true; - public DebugWindow(DalamudPluginInterface _pluginInterface) : base("DebugWindow") + public DebugWindow(IDalamudPluginInterface _pluginInterface) : base("DebugWindow") { pluginInterface = _pluginInterface; cts = new CancellationTokenSource(); diff --git a/TickTracker/Windows/DevWindow.cs b/TickTracker/Windows/DevWindow.cs index 608e631..b62f062 100644 --- a/TickTracker/Windows/DevWindow.cs +++ b/TickTracker/Windows/DevWindow.cs @@ -19,7 +19,7 @@ namespace TickTracker.Windows; public sealed class DevWindow : Window, IDisposable { - private readonly DalamudPluginInterface pluginInterface; + private readonly IDalamudPluginInterface pluginInterface; private readonly IDataManager dataManager; private readonly IPluginLog log; private readonly IGameGui gameGui; @@ -37,7 +37,7 @@ public sealed class DevWindow : Window, IDisposable public bool startBenchmark { get; set; } private unsafe AtkUnitBase* NameplateAddon => (AtkUnitBase*)gameGui.GetAddonByName("NamePlate"); - public DevWindow(DalamudPluginInterface _pluginInterface, IDataManager _dataManager, IPluginLog _log, IGameGui _gameGui, Utilities _utilities) : base("DevWindow") + public DevWindow(IDalamudPluginInterface _pluginInterface, IDataManager _dataManager, IPluginLog _log, IGameGui _gameGui, Utilities _utilities) : base("DevWindow") { pluginInterface = _pluginInterface; dataManager = _dataManager; @@ -95,7 +95,7 @@ private unsafe void ImageNodeStuff() devNode?.Dispose(); devNode = new ImageNode(dataManager, log, tempUld) { - NodeID = devNodeImageId, + NodeId = devNodeImageId, }; } tempUld.Dispose(); @@ -150,7 +150,7 @@ private unsafe void InspectNodeStuff() var height = isHighResolution ? currentPart.Height * 2 : currentPart.Height; devNode.imageNode->AtkResNode.SetHeight((ushort)height); devNode.imageNode->AtkResNode.SetWidth((ushort)width); - Print($"NodeId: {devNode.imageNode->AtkResNode.NodeID}\n" + + Print($"NodeId: {devNode.imageNode->AtkResNode.NodeId}\n" + $"Has {devNode.imageNode->PartsList->PartCount} Parts\n" + $"Current partsList: {devNode.imageNode->PartsList->Id}\n" + $"Current part: {devNode.imageNode->PartId}\n"); @@ -161,7 +161,7 @@ private unsafe void InspectNodeStuff() } } - public void BenchmarkSpawner(PlayerCharacter player, int iterations, FrozenSet bag1, FrozenSet bag2, FrozenSet bag3) + public void BenchmarkSpawner(IPlayerCharacter player, int iterations, FrozenSet bag1, FrozenSet bag2, FrozenSet bag3) { log.Debug("Benchmark Started"); foreach (var test in GetActionDictionary(player, bag1, bag2, bag3)) @@ -171,7 +171,7 @@ public void BenchmarkSpawner(PlayerCharacter player, int iterations, FrozenSet GetActionDictionary(PlayerCharacter player, FrozenSet bag1, FrozenSet bag2, FrozenSet bag3) + private static Dictionary GetActionDictionary(IPlayerCharacter player, FrozenSet bag1, FrozenSet bag2, FrozenSet bag3) { var testList = player.StatusList; return new Dictionary(StringComparer.Ordinal) diff --git a/TickTracker/packages.lock.json b/TickTracker/packages.lock.json index 0aba72a..e7062ce 100644 --- a/TickTracker/packages.lock.json +++ b/TickTracker/packages.lock.json @@ -4,15 +4,15 @@ "net8.0-windows7.0": { "DalamudPackager": { "type": "Direct", - "requested": "[2.1.12, )", - "resolved": "2.1.12", - "contentHash": "Sc0PVxvgg4NQjcI8n10/VfUQBAS4O+Fw2pZrAqBdRMbthYGeogzu5+xmIGCGmsEZ/ukMOBuAqiNiB5qA3MRalg==" + "requested": "[2.1.13, )", + "resolved": "2.1.13", + "contentHash": "rMN1omGe8536f4xLMvx9NwfvpAc9YFFfeXJ1t4P4PE6Gu8WCIoFliR1sh07hM+bfODmesk/dvMbji7vNI+B/pQ==" }, "Meziantou.Analyzer": { "type": "Direct", - "requested": "[2.0.158, )", - "resolved": "2.0.158", - "contentHash": "j76YbCBP7jI5H9MSxpmpsZiTz2rGiDxvQ/Vkm5XL+SAsrtsXPVcOQWx4hrwpmSxjP8acEF7l6BTELEcdj3cGRQ==" + "requested": "[2.0.159, )", + "resolved": "2.0.159", + "contentHash": "+Lu4NktCK98/PkPCluTA+uRHS7uvMXa/Z2WLPE8TDsS/ybYtaOhfq8Wi745fO26wI8rNGaJlKsfFskcKWC5eDQ==" }, "Penumbra.Api": { "type": "Direct",