From 132581c6c253a501ad2774110111078736dbc0d3 Mon Sep 17 00:00:00 2001 From: konviction Date: Sun, 19 Nov 2023 21:18:40 -0500 Subject: [PATCH 1/9] Attempt at an update --- .gitmodules | 3 +++ ECommons | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 ECommons diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e8e1845 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "ECommons"] + path = ECommons + url = https://github.com/NightmareXIV/ECommons.git diff --git a/ECommons b/ECommons new file mode 160000 index 0000000..d2c6dcd --- /dev/null +++ b/ECommons @@ -0,0 +1 @@ +Subproject commit d2c6dcd5f5cbbff8ff7c31668dd5051cffffee8f From 597051d86d8dff4099632bba0cc6e49350d27034 Mon Sep 17 00:00:00 2001 From: konviction Date: Sun, 19 Nov 2023 21:18:54 -0500 Subject: [PATCH 2/9] Attempt at changes --- NamePlateDebuffs.sln | 14 +++- NamePlateDebuffs/AddonNamePlateHooks.cs | 16 ++-- ...ebuffsPluginConfig.cs => Configuration.cs} | 15 ++-- NamePlateDebuffs/NamePlateDebuffs.csproj | 6 +- NamePlateDebuffs/NamePlateDebuffsPlugin.cs | 84 ++++++++----------- NamePlateDebuffs/NamePlateDebuffsPluginUI.cs | 48 +++++------ NamePlateDebuffs/PluginAddressResolver.cs | 15 ++-- NamePlateDebuffs/StatusNode/StatusNode.cs | 54 ++++++------ .../StatusNode/StatusNodeGroup.cs | 12 +-- .../StatusNode/StatusNodeManager.cs | 6 +- NamePlateDebuffs/packages.lock.json | 9 +- 11 files changed, 135 insertions(+), 144 deletions(-) rename NamePlateDebuffs/{NamePlateDebuffsPluginConfig.cs => Configuration.cs} (81%) diff --git a/NamePlateDebuffs.sln b/NamePlateDebuffs.sln index 627c865..af8a2f6 100644 --- a/NamePlateDebuffs.sln +++ b/NamePlateDebuffs.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 17.0.31521.260 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NamePlateDebuffs", "NamePlateDebuffs\NamePlateDebuffs.csproj", "{782BF1DA-8527-49FC-8E37-82B7D7921354}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ECommons", "ECommons\ECommons\ECommons.csproj", "{397D800B-353D-4B78-9FAA-95F463543FAD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -13,14 +15,22 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {782BF1DA-8527-49FC-8E37-82B7D7921354}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {782BF1DA-8527-49FC-8E37-82B7D7921354}.Debug|Any CPU.Build.0 = Debug|Any CPU + {782BF1DA-8527-49FC-8E37-82B7D7921354}.Debug|Any CPU.ActiveCfg = Debug|x64 + {782BF1DA-8527-49FC-8E37-82B7D7921354}.Debug|Any CPU.Build.0 = Debug|x64 {782BF1DA-8527-49FC-8E37-82B7D7921354}.Debug|x64.ActiveCfg = Debug|Any CPU {782BF1DA-8527-49FC-8E37-82B7D7921354}.Debug|x64.Build.0 = Debug|Any CPU {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|Any CPU.ActiveCfg = Release|Any CPU {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|Any CPU.Build.0 = Release|Any CPU {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|x64.ActiveCfg = Release|x64 {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|x64.Build.0 = Release|x64 + {397D800B-353D-4B78-9FAA-95F463543FAD}.Debug|Any CPU.ActiveCfg = Debug|x64 + {397D800B-353D-4B78-9FAA-95F463543FAD}.Debug|Any CPU.Build.0 = Debug|x64 + {397D800B-353D-4B78-9FAA-95F463543FAD}.Debug|x64.ActiveCfg = Debug|x64 + {397D800B-353D-4B78-9FAA-95F463543FAD}.Debug|x64.Build.0 = Debug|x64 + {397D800B-353D-4B78-9FAA-95F463543FAD}.Release|Any CPU.ActiveCfg = Release|x64 + {397D800B-353D-4B78-9FAA-95F463543FAD}.Release|Any CPU.Build.0 = Release|x64 + {397D800B-353D-4B78-9FAA-95F463543FAD}.Release|x64.ActiveCfg = Release|x64 + {397D800B-353D-4B78-9FAA-95F463543FAD}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/NamePlateDebuffs/AddonNamePlateHooks.cs b/NamePlateDebuffs/AddonNamePlateHooks.cs index 4b261fc..fc9bcdb 100644 --- a/NamePlateDebuffs/AddonNamePlateHooks.cs +++ b/NamePlateDebuffs/AddonNamePlateHooks.cs @@ -1,9 +1,9 @@ -using Dalamud.Hooking; +using Dalamud.Game.ClientState.Keys; +using Dalamud.Hooking; using FFXIVClientStructs.FFXIV.Client.Game; using FFXIVClientStructs.FFXIV.Client.Game.Character; using FFXIVClientStructs.FFXIV.Client.System.Framework; using FFXIVClientStructs.FFXIV.Client.UI; -using FFXIVClientStructs.FFXIV.Component.GUI; using System; using System.Diagnostics; @@ -34,8 +34,8 @@ public AddonNamePlateHooks(NamePlateDebuffsPlugin p) public void Initialize() { - _hookAddonNamePlateFinalize = new Hook(_plugin.Address.AddonNamePlateFinalizeAddress, AddonNamePlateFinalizeDetour); - _hookAddonNamePlateDraw = new Hook(_plugin.Address.AddonNamePlateDrawAddress, AddonNamePlateDrawDetour); + _hookAddonNamePlateFinalize = NamePlateDebuffsPlugin.Hook.HookFromAddress(_plugin.Address.AddonNamePlateFinalizeAddress, AddonNamePlateFinalizeDetour); + _hookAddonNamePlateDraw = NamePlateDebuffsPlugin.Hook.HookFromAddress(_plugin.Address.AddonNamePlateDrawAddress, AddonNamePlateDrawDetour); _hookAddonNamePlateFinalize.Enable(); _hookAddonNamePlateDraw.Enable(); @@ -49,7 +49,7 @@ public void Dispose() public void AddonNamePlateDrawDetour(AddonNamePlate* thisPtr) { - if (!_plugin.Config.Enabled || _plugin.InPvp) + if (!_plugin.Configuration.Enabled || _plugin.InPvp) { if (_timer.IsRunning) { @@ -71,7 +71,7 @@ public void AddonNamePlateDrawDetour(AddonNamePlate* thisPtr) _elapsed += _timer.ElapsedMilliseconds; _timer.Restart(); - if (_elapsed >= _plugin.Config.UpdateInterval) + if (_elapsed >= _plugin.Configuration.UpdateInterval) { if (!_plugin.StatusNodeManager.Built) { @@ -80,7 +80,7 @@ public void AddonNamePlateDrawDetour(AddonNamePlate* thisPtr) return; } - var framework = FFXIVClientStructs.FFXIV.Client.System.Framework.Framework.Instance(); + var framework = Framework.Instance(); var ui3DModule = framework->GetUiModule()->GetUI3DModule(); for (int i = 0; i < ui3DModule->NamePlateObjectInfoCount; i++) @@ -114,7 +114,7 @@ public void AddonNamePlateDrawDetour(AddonNamePlate* thisPtr) _plugin.StatusNodeManager.HideUnusedStatus(npIndex, 0); continue; } - StatusManager targetStatus = ((BattleChara*)objectInfo->GameObject)->StatusManager; + StatusManager targetStatus = ((BattleChara*)objectInfo->GameObject)->GetStatusManager[0]; var statusArray = (Status*)targetStatus.Status; diff --git a/NamePlateDebuffs/NamePlateDebuffsPluginConfig.cs b/NamePlateDebuffs/Configuration.cs similarity index 81% rename from NamePlateDebuffs/NamePlateDebuffsPluginConfig.cs rename to NamePlateDebuffs/Configuration.cs index 03436c5..3348139 100644 --- a/NamePlateDebuffs/NamePlateDebuffsPluginConfig.cs +++ b/NamePlateDebuffs/Configuration.cs @@ -1,16 +1,12 @@ using Dalamud.Configuration; using Dalamud.Plugin; using System; -using System.Collections.Generic; -using System.Linq; using System.Numerics; -using System.Text; -using System.Threading.Tasks; namespace NamePlateDebuffs { [Serializable] - public class NamePlateDebuffsPluginConfig : IPluginConfiguration + public class Configuration : IPluginConfiguration { public int Version { get; set; } = 1; @@ -35,8 +31,8 @@ public class NamePlateDebuffsPluginConfig : IPluginConfiguration public int DurationY = 23; public int FontSize = 14; public int DurationPadding = 2; - public Vector4 DurationTextColor = new Vector4(1, 1, 1, 1); - public Vector4 DurationEdgeColor = new Vector4(0, 0, 0, 1); + public Vector4 DurationTextColor = new(1, 1, 1, 1); + public Vector4 DurationEdgeColor = new(0, 0, 0, 1); public void SetDefaults() { @@ -70,7 +66,8 @@ public void SetDefaults() DurationEdgeColor.W = 1; } - [NonSerialized] private DalamudPluginInterface _pluginInterface; + [NonSerialized] + private DalamudPluginInterface? _pluginInterface; public void Initialize(DalamudPluginInterface pluginInterface) { @@ -79,7 +76,7 @@ public void Initialize(DalamudPluginInterface pluginInterface) public void Save() { - _pluginInterface.SavePluginConfig(this); + _pluginInterface!.SavePluginConfig(this); } } } diff --git a/NamePlateDebuffs/NamePlateDebuffs.csproj b/NamePlateDebuffs/NamePlateDebuffs.csproj index 464892c..14b2ba0 100644 --- a/NamePlateDebuffs/NamePlateDebuffs.csproj +++ b/NamePlateDebuffs/NamePlateDebuffs.csproj @@ -25,9 +25,11 @@ - + + + + - $(DalamudLibPath)Dalamud.dll diff --git a/NamePlateDebuffs/NamePlateDebuffsPlugin.cs b/NamePlateDebuffs/NamePlateDebuffsPlugin.cs index ec0d0d6..79b54c0 100644 --- a/NamePlateDebuffs/NamePlateDebuffsPlugin.cs +++ b/NamePlateDebuffs/NamePlateDebuffsPlugin.cs @@ -1,13 +1,10 @@ using Dalamud.Game.Command; +using Dalamud.IoC; using Dalamud.Plugin; -using Lumina.Excel.GeneratedSheets; +using Dalamud.Plugin.Services; using NamePlateDebuffs.StatusNode; -using System.Collections.Generic; -using Dalamud.Data; using Dalamud.Game; -using Dalamud.Game.ClientState; -using Dalamud.IoC; -using Dalamud.Logging; + namespace NamePlateDebuffs { @@ -15,47 +12,34 @@ public class NamePlateDebuffsPlugin : IDalamudPlugin { public string Name => "NamePlateDebuffs"; - [PluginService] - [RequiredVersion("1.0")] - public DalamudPluginInterface Interface { get; private set; } = null!; - - [PluginService] - [RequiredVersion("1.0")] - public ClientState ClientState { get; private set; } = null!; - - [PluginService] - [RequiredVersion("1.0")] - public static CommandManager CommandManager { get; private set; } = null!; - - public DataManager DataManager { get; private set; } = null!; - public Framework Framework { get; private set; } = null!; + [PluginService][RequiredVersion("1.0")] public DalamudPluginInterface PluginInterface { get; private set; } = null!; + [PluginService][RequiredVersion("1.0")] public IClientState ClientState { get; private set; } = null!; + [PluginService][RequiredVersion("1.0")] public static ICommandManager CommandManager { get; private set; } = null!; + [PluginService] public static IDataManager DataManager { get; private set; } = null!; + [PluginService] public static IFramework Framework { get; private set; } = null!; + [PluginService] public static IPluginLog Log { get; private set; } = null!; + [PluginService] public static ISigScanner SigScanner { get; private set; } = null!; + [PluginService] public static IGameInteropProvider Hook { get; private set; } = null!; public PluginAddressResolver Address { get; private set; } = null!; public StatusNodeManager StatusNodeManager { get; private set; } = null!; public static AddonNamePlateHooks Hooks { get; private set; } = null!; public NamePlateDebuffsPluginUI UI { get; private set; } = null!; - public NamePlateDebuffsPluginConfig Config { get; private set; } = null!; + public Configuration Configuration { get;} internal bool InPvp; - public NamePlateDebuffsPlugin( - ClientState clientState, - CommandManager commandManager, - DalamudPluginInterface pluginInterface, - DataManager dataManager, - Framework framework - ) + public NamePlateDebuffsPlugin() { - ClientState = clientState; - CommandManager = commandManager; - DataManager = dataManager; - Interface = pluginInterface; - Framework = framework; + // load ECommons + //ECommonsMain.Init(PluginInterface, this, Module.DalamudReflector); + + // load or create config + Configuration = PluginInterface.GetPluginConfig() as Configuration ?? new Configuration(); + Configuration.Initialize(PluginInterface); - Config = pluginInterface.GetPluginConfig() as NamePlateDebuffsPluginConfig ?? new NamePlateDebuffsPluginConfig(); - Config.Initialize(pluginInterface); Address = new PluginAddressResolver(); - Address.Setup(); + Address.Setup(SigScanner); StatusNodeManager = new StatusNodeManager(this); @@ -64,7 +48,7 @@ Framework framework UI = new NamePlateDebuffsPluginUI(this); - ClientState.TerritoryChanged += OnTerritoryChange; + //ClientState.TerritoryChanged += OnTerritoryChange; CommandManager.AddHandler("/npdebuffs", new CommandInfo(this.ToggleConfig) { @@ -73,7 +57,7 @@ Framework framework } public void Dispose() { - ClientState.TerritoryChanged -= OnTerritoryChange; + //ClientState?.TerritoryChanged -= OnTerritoryChange; CommandManager.RemoveHandler("/npdebuffs"); UI.Dispose(); @@ -81,18 +65,18 @@ public void Dispose() StatusNodeManager.Dispose(); } - private void OnTerritoryChange(object sender, ushort e) - { - try - { - TerritoryType territory = DataManager.GetExcelSheet()?.GetRow(e); - if (territory != null) InPvp = territory.IsPvpZone; - } - catch (KeyNotFoundException) - { - PluginLog.Warning("Could not get territory for current zone"); - } - } + //private void OnTerritoryChange(object sender, ushort e) + //{ + // try + // { + // TerritoryType? territory = DataManager.GetExcelSheet()?.GetRow(e); + // if (territory != null) InPvp = territory.IsPvpZone; + // } + // catch (KeyNotFoundException) + // { + // Log.Warning("Could not get territory for current zone"); + // } + //} private void ToggleConfig(string command, string args) { diff --git a/NamePlateDebuffs/NamePlateDebuffsPluginUI.cs b/NamePlateDebuffs/NamePlateDebuffsPluginUI.cs index af21cf2..a2e464f 100644 --- a/NamePlateDebuffs/NamePlateDebuffsPluginUI.cs +++ b/NamePlateDebuffs/NamePlateDebuffsPluginUI.cs @@ -21,14 +21,14 @@ public NamePlateDebuffsPluginUI(NamePlateDebuffsPlugin p) { _plugin = p; - _plugin.Interface.UiBuilder.OpenConfigUi += UiBuilder_OnOpenConfigUi; - _plugin.Interface.UiBuilder.Draw += UiBuilder_OnBuild; + _plugin.PluginInterface.UiBuilder.OpenConfigUi += UiBuilder_OnOpenConfigUi; + _plugin.PluginInterface.UiBuilder.Draw += UiBuilder_OnBuild; } public void Dispose() { - _plugin.Interface.UiBuilder.OpenConfigUi -= UiBuilder_OnOpenConfigUi; - _plugin.Interface.UiBuilder.Draw -= UiBuilder_OnBuild; + _plugin.PluginInterface.UiBuilder.OpenConfigUi -= UiBuilder_OnOpenConfigUi; + _plugin.PluginInterface.UiBuilder.Draw -= UiBuilder_OnBuild; } public void ToggleConfig() @@ -55,13 +55,13 @@ public void UiBuilder_OnBuild() if (ImGui.CollapsingHeader("General", ImGuiTreeNodeFlags.DefaultOpen)) { - needSave |= ImGui.Checkbox("Enabled", ref _plugin.Config.Enabled); - needSave |= ImGui.InputInt("Update Interval (ms)", ref _plugin.Config.UpdateInterval, 10); + needSave |= ImGui.Checkbox("Enabled", ref _plugin.Configuration.Enabled); + needSave |= ImGui.InputInt("Update Interval (ms)", ref _plugin.Configuration.UpdateInterval, 10); if (ImGui.IsItemHovered()) ImGui.SetTooltip("Interval between status updates in milliseconds"); if (ImGui.Button("Reset Config to Defaults")) { - _plugin.Config.SetDefaults(); + _plugin.Configuration.SetDefaults(); needSave = true; } ImGui.Text("While config is open, test nodes are displayed to help with configuration."); @@ -69,33 +69,33 @@ public void UiBuilder_OnBuild() if (ImGui.CollapsingHeader("Node Group", ImGuiTreeNodeFlags.DefaultOpen)) { - needSave |= ImGui.Checkbox("Fill From Right", ref _plugin.Config.FillFromRight); - needSave |= ImGui.SliderInt("X Offset", ref _plugin.Config.GroupX, -200, 200); - needSave |= ImGui.SliderInt("Y Offset", ref _plugin.Config.GroupY, -200, 200); - needSave |= ImGui.SliderInt("Node Spacing", ref _plugin.Config.NodeSpacing, -5, 30); - needSave |= ImGui.SliderFloat("Group Scale", ref _plugin.Config.Scale, 0.01F, 3.0F); + needSave |= ImGui.Checkbox("Fill From Right", ref _plugin.Configuration.FillFromRight); + needSave |= ImGui.SliderInt("X Offset", ref _plugin.Configuration.GroupX, -200, 200); + needSave |= ImGui.SliderInt("Y Offset", ref _plugin.Configuration.GroupY, -200, 200); + needSave |= ImGui.SliderInt("Node Spacing", ref _plugin.Configuration.NodeSpacing, -5, 30); + needSave |= ImGui.SliderFloat("Group Scale", ref _plugin.Configuration.Scale, 0.01F, 3.0F); } if (ImGui.CollapsingHeader("Node", ImGuiTreeNodeFlags.DefaultOpen)) { ImGui.Text("Try and maintain a 3:4 ratio of Icon Width:Icon Height for best results."); - needSave |= ImGui.SliderInt("Icon X Offset", ref _plugin.Config.IconX, -200, 200); - needSave |= ImGui.SliderInt("Icon Y Offset", ref _plugin.Config.IconY, -200, 200); - needSave |= ImGui.SliderInt("Icon Width", ref _plugin.Config.IconWidth, 5, 100); - needSave |= ImGui.SliderInt("Icon Height", ref _plugin.Config.IconHeight, 5, 100); - needSave |= ImGui.SliderInt("Duration X Offset", ref _plugin.Config.DurationX, -200, 200); - needSave |= ImGui.SliderInt("Duration Y Offset", ref _plugin.Config.DurationY, -200, 200); - needSave |= ImGui.SliderInt("Duration Font Size", ref _plugin.Config.FontSize, 1, 60); - needSave |= ImGui.SliderInt("Duration Padding", ref _plugin.Config.DurationPadding, -100, 100); - - needSave |= ImGui.ColorEdit4("Duration Text Color", ref _plugin.Config.DurationTextColor); - needSave |= ImGui.ColorEdit4("Duration Edge Color", ref _plugin.Config.DurationEdgeColor); + needSave |= ImGui.SliderInt("Icon X Offset", ref _plugin.Configuration.IconX, -200, 200); + needSave |= ImGui.SliderInt("Icon Y Offset", ref _plugin.Configuration.IconY, -200, 200); + needSave |= ImGui.SliderInt("Icon Width", ref _plugin.Configuration.IconWidth, 5, 100); + needSave |= ImGui.SliderInt("Icon Height", ref _plugin.Configuration.IconHeight, 5, 100); + needSave |= ImGui.SliderInt("Duration X Offset", ref _plugin.Configuration.DurationX, -200, 200); + needSave |= ImGui.SliderInt("Duration Y Offset", ref _plugin.Configuration.DurationY, -200, 200); + needSave |= ImGui.SliderInt("Duration Font Size", ref _plugin.Configuration.FontSize, 1, 60); + needSave |= ImGui.SliderInt("Duration Padding", ref _plugin.Configuration.DurationPadding, -100, 100); + + needSave |= ImGui.ColorEdit4("Duration Text Color", ref _plugin.Configuration.DurationTextColor); + needSave |= ImGui.ColorEdit4("Duration Edge Color", ref _plugin.Configuration.DurationEdgeColor); } if (needSave) { _plugin.StatusNodeManager.LoadConfig(); - _plugin.Config.Save(); + _plugin.Configuration.Save(); } diff --git a/NamePlateDebuffs/PluginAddressResolver.cs b/NamePlateDebuffs/PluginAddressResolver.cs index fe14171..ea427d6 100644 --- a/NamePlateDebuffs/PluginAddressResolver.cs +++ b/NamePlateDebuffs/PluginAddressResolver.cs @@ -1,12 +1,7 @@ using Dalamud.Game; -using Dalamud.Game.Internal; -using Dalamud.Plugin; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Dalamud.Logging; +using NamePlateDebuffs; namespace NamePlateDebuffs { @@ -20,14 +15,14 @@ public class PluginAddressResolver : BaseAddressResolver private const string AddonNamePlateDrawSignature = "0F B7 81 ?? ?? ?? ?? 4C 8B C1 66 C1 E0 06"; - protected override void Setup64Bit(SigScanner scanner) + protected override void Setup64Bit(ISigScanner scanner) { AddonNamePlateFinalizeAddress = scanner.ScanText(AddonNamePlateFinalizeSignature); AddonNamePlateDrawAddress = scanner.ScanText(AddonNamePlateDrawSignature); - PluginLog.Verbose("===== NamePlate Debuffs ====="); - PluginLog.Verbose($"{nameof(AddonNamePlateFinalizeAddress)} {AddonNamePlateFinalizeAddress.ToInt64():X}"); - PluginLog.Verbose($"{nameof(AddonNamePlateDrawAddress)} {AddonNamePlateDrawAddress.ToInt64():X}"); + NamePlateDebuffsPlugin.Log.Verbose("===== NamePlate Debuffs ====="); + NamePlateDebuffsPlugin.Log.Verbose($"{nameof(AddonNamePlateFinalizeAddress)} {AddonNamePlateFinalizeAddress.ToInt64():X}"); + NamePlateDebuffsPlugin.Log.Verbose($"{nameof(AddonNamePlateDrawAddress)} {AddonNamePlateDrawAddress.ToInt64():X}"); } } } diff --git a/NamePlateDebuffs/StatusNode/StatusNode.cs b/NamePlateDebuffs/StatusNode/StatusNode.cs index a11f06a..9abdb7c 100644 --- a/NamePlateDebuffs/StatusNode/StatusNode.cs +++ b/NamePlateDebuffs/StatusNode/StatusNode.cs @@ -50,32 +50,32 @@ public void LoadConfig() { if (!Built()) return; - IconNode->AtkResNode.SetPositionShort((short)_plugin.Config.IconX, (short)_plugin.Config.IconY); - IconNode->AtkResNode.SetHeight((ushort)_plugin.Config.IconHeight); - IconNode->AtkResNode.SetWidth((ushort)_plugin.Config.IconWidth); - DurationNode->AtkResNode.SetPositionShort((short)_plugin.Config.DurationX, (short)_plugin.Config.DurationY); - DurationNode->FontSize = (byte) _plugin.Config.FontSize; + IconNode->AtkResNode.SetPositionShort((short)_plugin.Configuration.IconX, (short)_plugin.Configuration.IconY); + IconNode->AtkResNode.SetHeight((ushort)_plugin.Configuration.IconHeight); + IconNode->AtkResNode.SetWidth((ushort)_plugin.Configuration.IconWidth); + DurationNode->AtkResNode.SetPositionShort((short)_plugin.Configuration.DurationX, (short)_plugin.Configuration.DurationY); + DurationNode->FontSize = (byte) _plugin.Configuration.FontSize; ushort outWidth = 0; ushort outHeight = 0; DurationNode->GetTextDrawSize(&outWidth, &outHeight); - DurationNode->AtkResNode.SetWidth((ushort)(outWidth + 2 * _plugin.Config.DurationPadding)); - DurationNode->AtkResNode.SetHeight((ushort)(outHeight + 2 * _plugin.Config.DurationPadding)); + DurationNode->AtkResNode.SetWidth((ushort)(outWidth + 2 * _plugin.Configuration.DurationPadding)); + DurationNode->AtkResNode.SetHeight((ushort)(outHeight + 2 * _plugin.Configuration.DurationPadding)); - ushort iconHeight = (ushort)(_plugin.Config.IconY + _plugin.Config.IconHeight); - ushort durationHeight = (ushort)(_plugin.Config.DurationY + DurationNode->AtkResNode.Height); + ushort iconHeight = (ushort)(_plugin.Configuration.IconY + _plugin.Configuration.IconHeight); + ushort durationHeight = (ushort)(_plugin.Configuration.DurationY + DurationNode->AtkResNode.Height); RootNode->SetHeight(durationHeight > iconHeight ? durationHeight : iconHeight); - RootNode->SetWidth((ushort)(DurationNode->AtkResNode.Width > _plugin.Config.IconWidth ? DurationNode->AtkResNode.Width : _plugin.Config.IconWidth)); + RootNode->SetWidth((ushort)(DurationNode->AtkResNode.Width > _plugin.Configuration.IconWidth ? DurationNode->AtkResNode.Width : _plugin.Configuration.IconWidth)); - DurationNode->TextColor.R = (byte)(_plugin.Config.DurationTextColor.X * 255); - DurationNode->TextColor.G = (byte)(_plugin.Config.DurationTextColor.Y * 255); - DurationNode->TextColor.B = (byte)(_plugin.Config.DurationTextColor.Z * 255); - DurationNode->TextColor.A = (byte)(_plugin.Config.DurationTextColor.W * 255); + DurationNode->TextColor.R = (byte)(_plugin.Configuration.DurationTextColor.X * 255); + DurationNode->TextColor.G = (byte)(_plugin.Configuration.DurationTextColor.Y * 255); + DurationNode->TextColor.B = (byte)(_plugin.Configuration.DurationTextColor.Z * 255); + DurationNode->TextColor.A = (byte)(_plugin.Configuration.DurationTextColor.W * 255); - DurationNode->EdgeColor.R = (byte)(_plugin.Config.DurationEdgeColor.X * 255); - DurationNode->EdgeColor.G = (byte)(_plugin.Config.DurationEdgeColor.Y * 255); - DurationNode->EdgeColor.B = (byte)(_plugin.Config.DurationEdgeColor.Z * 255); - DurationNode->EdgeColor.A = (byte)(_plugin.Config.DurationEdgeColor.W * 255); + DurationNode->EdgeColor.R = (byte)(_plugin.Configuration.DurationEdgeColor.X * 255); + DurationNode->EdgeColor.G = (byte)(_plugin.Configuration.DurationEdgeColor.Y * 255); + DurationNode->EdgeColor.B = (byte)(_plugin.Configuration.DurationEdgeColor.Z * 255); + DurationNode->EdgeColor.A = (byte)(_plugin.Configuration.DurationEdgeColor.W * 255); } public bool Built() => RootNode != null && IconNode != null && DurationNode != null; @@ -150,14 +150,14 @@ public void DestroyNodes() var newResNode = (AtkResNode*)IMemorySpace.GetUISpace()->Malloc((ulong)sizeof(AtkResNode), 8); if (newResNode == null) { - PluginLog.Debug("Failed to allocate memory for res node"); + NamePlateDebuffsPlugin.Log.Debug("Failed to allocate memory for res node"); return null; } IMemorySpace.Memset(newResNode, 0, (ulong)sizeof(AtkResNode)); newResNode->Ctor(); newResNode->Type = NodeType.Res; - newResNode->Flags = (short)(NodeFlags.AnchorLeft | NodeFlags.AnchorTop); + newResNode->NodeFlags = (NodeFlags.AnchorLeft | NodeFlags.AnchorTop); newResNode->DrawFlags = 0; return newResNode; @@ -168,14 +168,14 @@ public void DestroyNodes() var newImageNode = (AtkImageNode*)IMemorySpace.GetUISpace()->Malloc((ulong)sizeof(AtkImageNode), 8); if (newImageNode == null) { - PluginLog.Debug("Failed to allocate memory for image node"); + NamePlateDebuffsPlugin.Log.Debug("Failed to allocate memory for image node"); return null; } IMemorySpace.Memset(newImageNode, 0, (ulong)sizeof(AtkImageNode)); newImageNode->Ctor(); newImageNode->AtkResNode.Type = NodeType.Image; - newImageNode->AtkResNode.Flags = (short)(NodeFlags.AnchorLeft | NodeFlags.AnchorTop | NodeFlags.UseDepthBasedPriority); + newImageNode->AtkResNode.NodeFlags = (NodeFlags.AnchorLeft | NodeFlags.AnchorTop | NodeFlags.UseDepthBasedPriority); newImageNode->AtkResNode.DrawFlags = 0; newImageNode->WrapMode = 1; @@ -184,7 +184,7 @@ public void DestroyNodes() var partsList = (AtkUldPartsList*)IMemorySpace.GetUISpace()->Malloc((ulong)sizeof(AtkUldPartsList), 8); if (partsList == null) { - PluginLog.Debug("Failed to allocate memory for parts list"); + NamePlateDebuffsPlugin.Log.Debug("Failed to allocate memory for parts list"); newImageNode->AtkResNode.Destroy(true); return null; } @@ -195,7 +195,7 @@ public void DestroyNodes() var part = (AtkUldPart*)IMemorySpace.GetUISpace()->Malloc((ulong)sizeof(AtkUldPart), 8); if (part == null) { - PluginLog.Debug("Failed to allocate memory for part"); + NamePlateDebuffsPlugin.Log.Debug("Failed to allocate memory for part"); IMemorySpace.Free(partsList, (ulong)sizeof(AtkUldPartsList)); newImageNode->AtkResNode.Destroy(true); } @@ -210,7 +210,7 @@ public void DestroyNodes() var asset = (AtkUldAsset*)IMemorySpace.GetUISpace()->Malloc((ulong)sizeof(AtkUldAsset), 8); if (asset == null) { - PluginLog.Log("Failed to allocate memory for asset"); + NamePlateDebuffsPlugin.Log.Debug("Failed to allocate memory for asset"); IMemorySpace.Free(part, (ulong)sizeof(AtkUldPart)); IMemorySpace.Free(partsList, (ulong)sizeof(AtkUldPartsList)); newImageNode->AtkResNode.Destroy(true); @@ -233,14 +233,14 @@ public void DestroyNodes() var newTextNode = (AtkTextNode*)IMemorySpace.GetUISpace()->Malloc((ulong)sizeof(AtkTextNode), 8); if (newTextNode == null) { - PluginLog.Debug("Failed to allocate memory for text node"); + NamePlateDebuffsPlugin.Log.Debug("Failed to allocate memory for text node"); return null; } IMemorySpace.Memset(newTextNode, 0, (ulong)sizeof(AtkTextNode)); newTextNode->Ctor(); newTextNode->AtkResNode.Type = NodeType.Text; - newTextNode->AtkResNode.Flags = (short)(NodeFlags.AnchorLeft | NodeFlags.AnchorTop | NodeFlags.UseDepthBasedPriority); + newTextNode->AtkResNode.NodeFlags = (NodeFlags.AnchorLeft | NodeFlags.AnchorTop | NodeFlags.UseDepthBasedPriority); newTextNode->AtkResNode.DrawFlags = 12; newTextNode->AtkResNode.SetWidth(24); newTextNode->AtkResNode.SetHeight(17); diff --git a/NamePlateDebuffs/StatusNode/StatusNodeGroup.cs b/NamePlateDebuffs/StatusNode/StatusNodeGroup.cs index e91cf5c..05a980f 100644 --- a/NamePlateDebuffs/StatusNode/StatusNodeGroup.cs +++ b/NamePlateDebuffs/StatusNode/StatusNodeGroup.cs @@ -93,17 +93,17 @@ public void ForEachNode(Action func) public void LoadConfig() { - RootNode->SetPositionShort((short)_plugin.Config.GroupX, (short)_plugin.Config.GroupY); - RootNode->SetScale(_plugin.Config.Scale, _plugin.Config.Scale); + RootNode->SetPositionShort((short)_plugin.Configuration.GroupX, (short)_plugin.Configuration.GroupY); + RootNode->SetScale(_plugin.Configuration.Scale, _plugin.Configuration.Scale); - RootNode->SetWidth((ushort) (StatusNodes[0].RootNode->Width * NodePerGroupCount + _plugin.Config.NodeSpacing * (NodePerGroupCount - 1))); + RootNode->SetWidth((ushort) (StatusNodes[0].RootNode->Width * NodePerGroupCount + _plugin.Configuration.NodeSpacing * (NodePerGroupCount - 1))); RootNode->SetHeight(StatusNodes[0].RootNode->Height); for (int i = 0; i < NodePerGroupCount; i++) { if (StatusNodes[i] != null) { - StatusNodes[i].RootNode->SetPositionShort((short)((_plugin.Config.FillFromRight ? 3 - i : i) * (StatusNodes[0].RootNode->Width + _plugin.Config.NodeSpacing)), 0); + StatusNodes[i].RootNode->SetPositionShort((short)((_plugin.Configuration.FillFromRight ? 3 - i : i) * (StatusNodes[0].RootNode->Width + _plugin.Configuration.NodeSpacing)), 0); } } } @@ -154,14 +154,14 @@ public void SetupVisibility() var newResNode = (AtkResNode*)IMemorySpace.GetUISpace()->Malloc((ulong)sizeof(AtkResNode), 8); if (newResNode == null) { - PluginLog.Debug("Failed to allocate memory for res node"); + NamePlateDebuffsPlugin.Log.Debug("Failed to allocate memory for res node"); return null; } IMemorySpace.Memset(newResNode, 0, (ulong)sizeof(AtkResNode)); newResNode->Ctor(); newResNode->Type = NodeType.Res; - newResNode->Flags = (short)(NodeFlags.AnchorLeft | NodeFlags.AnchorTop); + newResNode->NodeFlags = (NodeFlags.AnchorLeft | NodeFlags.AnchorTop); newResNode->DrawFlags = 0; return newResNode; diff --git a/NamePlateDebuffs/StatusNode/StatusNodeManager.cs b/NamePlateDebuffs/StatusNode/StatusNodeManager.cs index e9f1d89..d6f8c18 100644 --- a/NamePlateDebuffs/StatusNode/StatusNodeManager.cs +++ b/NamePlateDebuffs/StatusNode/StatusNodeManager.cs @@ -30,7 +30,7 @@ internal StatusNodeManager(NamePlateDebuffsPlugin p) NodeGroups = new StatusNodeGroup[NamePlateCount]; - StatusSheet = _plugin.DataManager.GetExcelSheet(); + StatusSheet = NamePlateDebuffsPlugin.DataManager.GetExcelSheet(); } public void Dispose() @@ -72,7 +72,7 @@ public void SetStatus(int groupIndex, int statusIndex, int id, int timer) StatusNodeGroup group = NodeGroups[groupIndex]; - group?.SetStatus(statusIndex, row.Icon, timer); + group?.SetStatus(statusIndex, (int)row.Icon, timer); } public void HideUnusedStatus(int groupIndex, int statusCount) @@ -113,7 +113,7 @@ public bool BuildNodes(bool rebuild = false) for(byte i = 0; i < NamePlateCount; i++) { - StatusNodeGroup nodeGroup = new StatusNodeGroup(_plugin); + StatusNodeGroup nodeGroup = new(_plugin); var npObj = &namePlateAddon->NamePlateObjectArray[i]; if (!nodeGroup.BuildNodes(StartingNodeId)) { diff --git a/NamePlateDebuffs/packages.lock.json b/NamePlateDebuffs/packages.lock.json index 2426061..b2eff6f 100644 --- a/NamePlateDebuffs/packages.lock.json +++ b/NamePlateDebuffs/packages.lock.json @@ -4,9 +4,12 @@ "net7.0-windows7.0": { "DalamudPackager": { "type": "Direct", - "requested": "[2.1.10, )", - "resolved": "2.1.10", - "contentHash": "S6NrvvOnLgT4GDdgwuKVJjbFo+8ZEj+JsEYk9ojjOR/MMfv1dIFpT8aRJQfI24rtDcw1uF+GnSSMN4WW1yt7fw==" + "requested": "[2.1.12, )", + "resolved": "2.1.12", + "contentHash": "Sc0PVxvgg4NQjcI8n10/VfUQBAS4O+Fw2pZrAqBdRMbthYGeogzu5+xmIGCGmsEZ/ukMOBuAqiNiB5qA3MRalg==" + }, + "ecommons": { + "type": "Project" } } } From f72896122c61feac5d73e1860ad032f78d335c5f Mon Sep 17 00:00:00 2001 From: konviction Date: Sun, 19 Nov 2023 21:33:49 -0500 Subject: [PATCH 3/9] add repo json --- NamePlateDebuffs.sln | 10 ---------- NamePlateDebuffs/NamePlateDebuffs.csproj | 3 --- NamePlateDebuffs/Repo/nameplate.json | 21 +++++++++++++++++++++ 3 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 NamePlateDebuffs/Repo/nameplate.json diff --git a/NamePlateDebuffs.sln b/NamePlateDebuffs.sln index af8a2f6..d24abb1 100644 --- a/NamePlateDebuffs.sln +++ b/NamePlateDebuffs.sln @@ -5,8 +5,6 @@ VisualStudioVersion = 17.0.31521.260 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NamePlateDebuffs", "NamePlateDebuffs\NamePlateDebuffs.csproj", "{782BF1DA-8527-49FC-8E37-82B7D7921354}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ECommons", "ECommons\ECommons\ECommons.csproj", "{397D800B-353D-4B78-9FAA-95F463543FAD}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -23,14 +21,6 @@ Global {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|Any CPU.Build.0 = Release|Any CPU {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|x64.ActiveCfg = Release|x64 {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|x64.Build.0 = Release|x64 - {397D800B-353D-4B78-9FAA-95F463543FAD}.Debug|Any CPU.ActiveCfg = Debug|x64 - {397D800B-353D-4B78-9FAA-95F463543FAD}.Debug|Any CPU.Build.0 = Debug|x64 - {397D800B-353D-4B78-9FAA-95F463543FAD}.Debug|x64.ActiveCfg = Debug|x64 - {397D800B-353D-4B78-9FAA-95F463543FAD}.Debug|x64.Build.0 = Debug|x64 - {397D800B-353D-4B78-9FAA-95F463543FAD}.Release|Any CPU.ActiveCfg = Release|x64 - {397D800B-353D-4B78-9FAA-95F463543FAD}.Release|Any CPU.Build.0 = Release|x64 - {397D800B-353D-4B78-9FAA-95F463543FAD}.Release|x64.ActiveCfg = Release|x64 - {397D800B-353D-4B78-9FAA-95F463543FAD}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/NamePlateDebuffs/NamePlateDebuffs.csproj b/NamePlateDebuffs/NamePlateDebuffs.csproj index 14b2ba0..5f68bd3 100644 --- a/NamePlateDebuffs/NamePlateDebuffs.csproj +++ b/NamePlateDebuffs/NamePlateDebuffs.csproj @@ -27,9 +27,6 @@ - - - $(DalamudLibPath)Dalamud.dll diff --git a/NamePlateDebuffs/Repo/nameplate.json b/NamePlateDebuffs/Repo/nameplate.json new file mode 100644 index 0000000..164f00e --- /dev/null +++ b/NamePlateDebuffs/Repo/nameplate.json @@ -0,0 +1,21 @@ +[ + { + "Author": "aers, JHerig, squidmade, konviction", + "Name": "NamePlateDebuffsContinued", + "Punchline": "Displays debuffs you cast on nameplates of enemies", + "Description": "This is a Dalamud plugin to place debuff icons on nameplates of enemies in the field so one can see the status of debuffs on enemies other than the targeted enemy", + "Tags": [], + "InternalName": "NamePlateDebuffsContinued", + "RepoUrl": "https://github.com/Konscription/NamePlateDebuffs", + "DownloadCount": 0, + "LastUpdate": 1700439127865, + "DownloadLinkInstall": "https://github.com/Konscription/NamePlateDebuffs/releases/download/test/NamePlateDebuffs-Latest.zip", + "DownloadLinkUpdate": "https://github.com/Konscription/NamePlateDebuffs/releases/download/test/NamePlateDebuffs-Latest.zip", + "AssemblyVersion": "0.0.0.1", + "ApplicableVersion": "any", + "DalamudApiLevel": "9", + "Changelog": "", + "IconUrl": "https://github.com/Konscription/NamePlateDebuffs/blob/test/NamePlateDebuffs/Resources/icon.png", + "ImageUrls": [] + } +] \ No newline at end of file From e69f44f58fbb094ae5c599f7efadd33a6f051a85 Mon Sep 17 00:00:00 2001 From: konviction Date: Sun, 19 Nov 2023 21:59:05 -0500 Subject: [PATCH 4/9] removed unneeded stuff --- .gitmodules | 4 +--- ECommons | 1 - NamePlateDebuffs.sln | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) delete mode 160000 ECommons diff --git a/.gitmodules b/.gitmodules index e8e1845..8b13789 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1 @@ -[submodule "ECommons"] - path = ECommons - url = https://github.com/NightmareXIV/ECommons.git + diff --git a/ECommons b/ECommons deleted file mode 160000 index d2c6dcd..0000000 --- a/ECommons +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d2c6dcd5f5cbbff8ff7c31668dd5051cffffee8f diff --git a/NamePlateDebuffs.sln b/NamePlateDebuffs.sln index d24abb1..b073f13 100644 --- a/NamePlateDebuffs.sln +++ b/NamePlateDebuffs.sln @@ -17,8 +17,8 @@ Global {782BF1DA-8527-49FC-8E37-82B7D7921354}.Debug|Any CPU.Build.0 = Debug|x64 {782BF1DA-8527-49FC-8E37-82B7D7921354}.Debug|x64.ActiveCfg = Debug|Any CPU {782BF1DA-8527-49FC-8E37-82B7D7921354}.Debug|x64.Build.0 = Debug|Any CPU - {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|Any CPU.ActiveCfg = Release|Any CPU - {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|Any CPU.Build.0 = Release|Any CPU + {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|Any CPU.ActiveCfg = Release|x64 + {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|Any CPU.Build.0 = Release|x64 {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|x64.ActiveCfg = Release|x64 {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|x64.Build.0 = Release|x64 EndGlobalSection From 8d3800b0ca11104360d7d0d60bc78596f04d20a5 Mon Sep 17 00:00:00 2001 From: konviction Date: Sun, 19 Nov 2023 22:04:01 -0500 Subject: [PATCH 5/9] reverting some name changes --- NamePlateDebuffs/AddonNamePlateHooks.cs | 4 +- NamePlateDebuffs/NamePlateDebuffsPlugin.cs | 6 +-- ...ion.cs => NamePlateDebuffsPluginConfig.cs} | 2 +- NamePlateDebuffs/NamePlateDebuffsPluginUI.cs | 40 +++++++++---------- NamePlateDebuffs/Repo/nameplate.json | 21 ---------- NamePlateDebuffs/StatusNode/StatusNode.cs | 36 ++++++++--------- .../StatusNode/StatusNodeGroup.cs | 8 ++-- 7 files changed, 48 insertions(+), 69 deletions(-) rename NamePlateDebuffs/{Configuration.cs => NamePlateDebuffsPluginConfig.cs} (96%) delete mode 100644 NamePlateDebuffs/Repo/nameplate.json diff --git a/NamePlateDebuffs/AddonNamePlateHooks.cs b/NamePlateDebuffs/AddonNamePlateHooks.cs index fc9bcdb..04f3b16 100644 --- a/NamePlateDebuffs/AddonNamePlateHooks.cs +++ b/NamePlateDebuffs/AddonNamePlateHooks.cs @@ -49,7 +49,7 @@ public void Dispose() public void AddonNamePlateDrawDetour(AddonNamePlate* thisPtr) { - if (!_plugin.Configuration.Enabled || _plugin.InPvp) + if (!_plugin.Config.Enabled || _plugin.InPvp) { if (_timer.IsRunning) { @@ -71,7 +71,7 @@ public void AddonNamePlateDrawDetour(AddonNamePlate* thisPtr) _elapsed += _timer.ElapsedMilliseconds; _timer.Restart(); - if (_elapsed >= _plugin.Configuration.UpdateInterval) + if (_elapsed >= _plugin.Config.UpdateInterval) { if (!_plugin.StatusNodeManager.Built) { diff --git a/NamePlateDebuffs/NamePlateDebuffsPlugin.cs b/NamePlateDebuffs/NamePlateDebuffsPlugin.cs index 79b54c0..ab04841 100644 --- a/NamePlateDebuffs/NamePlateDebuffsPlugin.cs +++ b/NamePlateDebuffs/NamePlateDebuffsPlugin.cs @@ -24,7 +24,7 @@ public class NamePlateDebuffsPlugin : IDalamudPlugin public StatusNodeManager StatusNodeManager { get; private set; } = null!; public static AddonNamePlateHooks Hooks { get; private set; } = null!; public NamePlateDebuffsPluginUI UI { get; private set; } = null!; - public Configuration Configuration { get;} + public NamePlateDebuffsPluginConfig Config { get; private set; } = null!; internal bool InPvp; @@ -34,8 +34,8 @@ public NamePlateDebuffsPlugin() //ECommonsMain.Init(PluginInterface, this, Module.DalamudReflector); // load or create config - Configuration = PluginInterface.GetPluginConfig() as Configuration ?? new Configuration(); - Configuration.Initialize(PluginInterface); + Config = PluginInterface.GetPluginConfig() as NamePlateDebuffsPluginConfig ?? new NamePlateDebuffsPluginConfig(); + Config.Initialize(PluginInterface); Address = new PluginAddressResolver(); diff --git a/NamePlateDebuffs/Configuration.cs b/NamePlateDebuffs/NamePlateDebuffsPluginConfig.cs similarity index 96% rename from NamePlateDebuffs/Configuration.cs rename to NamePlateDebuffs/NamePlateDebuffsPluginConfig.cs index 3348139..e20d7c6 100644 --- a/NamePlateDebuffs/Configuration.cs +++ b/NamePlateDebuffs/NamePlateDebuffsPluginConfig.cs @@ -6,7 +6,7 @@ namespace NamePlateDebuffs { [Serializable] - public class Configuration : IPluginConfiguration + public class NamePlateDebuffsPluginConfig : IPluginConfiguration { public int Version { get; set; } = 1; diff --git a/NamePlateDebuffs/NamePlateDebuffsPluginUI.cs b/NamePlateDebuffs/NamePlateDebuffsPluginUI.cs index a2e464f..71f1801 100644 --- a/NamePlateDebuffs/NamePlateDebuffsPluginUI.cs +++ b/NamePlateDebuffs/NamePlateDebuffsPluginUI.cs @@ -55,13 +55,13 @@ public void UiBuilder_OnBuild() if (ImGui.CollapsingHeader("General", ImGuiTreeNodeFlags.DefaultOpen)) { - needSave |= ImGui.Checkbox("Enabled", ref _plugin.Configuration.Enabled); - needSave |= ImGui.InputInt("Update Interval (ms)", ref _plugin.Configuration.UpdateInterval, 10); + needSave |= ImGui.Checkbox("Enabled", ref _plugin.Config.Enabled); + needSave |= ImGui.InputInt("Update Interval (ms)", ref _plugin.Config.UpdateInterval, 10); if (ImGui.IsItemHovered()) ImGui.SetTooltip("Interval between status updates in milliseconds"); if (ImGui.Button("Reset Config to Defaults")) { - _plugin.Configuration.SetDefaults(); + _plugin.Config.SetDefaults(); needSave = true; } ImGui.Text("While config is open, test nodes are displayed to help with configuration."); @@ -69,33 +69,33 @@ public void UiBuilder_OnBuild() if (ImGui.CollapsingHeader("Node Group", ImGuiTreeNodeFlags.DefaultOpen)) { - needSave |= ImGui.Checkbox("Fill From Right", ref _plugin.Configuration.FillFromRight); - needSave |= ImGui.SliderInt("X Offset", ref _plugin.Configuration.GroupX, -200, 200); - needSave |= ImGui.SliderInt("Y Offset", ref _plugin.Configuration.GroupY, -200, 200); - needSave |= ImGui.SliderInt("Node Spacing", ref _plugin.Configuration.NodeSpacing, -5, 30); - needSave |= ImGui.SliderFloat("Group Scale", ref _plugin.Configuration.Scale, 0.01F, 3.0F); + needSave |= ImGui.Checkbox("Fill From Right", ref _plugin.Config.FillFromRight); + needSave |= ImGui.SliderInt("X Offset", ref _plugin.Config.GroupX, -200, 200); + needSave |= ImGui.SliderInt("Y Offset", ref _plugin.Config.GroupY, -200, 200); + needSave |= ImGui.SliderInt("Node Spacing", ref _plugin.Config.NodeSpacing, -5, 30); + needSave |= ImGui.SliderFloat("Group Scale", ref _plugin.Config.Scale, 0.01F, 3.0F); } if (ImGui.CollapsingHeader("Node", ImGuiTreeNodeFlags.DefaultOpen)) { ImGui.Text("Try and maintain a 3:4 ratio of Icon Width:Icon Height for best results."); - needSave |= ImGui.SliderInt("Icon X Offset", ref _plugin.Configuration.IconX, -200, 200); - needSave |= ImGui.SliderInt("Icon Y Offset", ref _plugin.Configuration.IconY, -200, 200); - needSave |= ImGui.SliderInt("Icon Width", ref _plugin.Configuration.IconWidth, 5, 100); - needSave |= ImGui.SliderInt("Icon Height", ref _plugin.Configuration.IconHeight, 5, 100); - needSave |= ImGui.SliderInt("Duration X Offset", ref _plugin.Configuration.DurationX, -200, 200); - needSave |= ImGui.SliderInt("Duration Y Offset", ref _plugin.Configuration.DurationY, -200, 200); - needSave |= ImGui.SliderInt("Duration Font Size", ref _plugin.Configuration.FontSize, 1, 60); - needSave |= ImGui.SliderInt("Duration Padding", ref _plugin.Configuration.DurationPadding, -100, 100); - - needSave |= ImGui.ColorEdit4("Duration Text Color", ref _plugin.Configuration.DurationTextColor); - needSave |= ImGui.ColorEdit4("Duration Edge Color", ref _plugin.Configuration.DurationEdgeColor); + needSave |= ImGui.SliderInt("Icon X Offset", ref _plugin.Config.IconX, -200, 200); + needSave |= ImGui.SliderInt("Icon Y Offset", ref _plugin.Config.IconY, -200, 200); + needSave |= ImGui.SliderInt("Icon Width", ref _plugin.Config.IconWidth, 5, 100); + needSave |= ImGui.SliderInt("Icon Height", ref _plugin.Config.IconHeight, 5, 100); + needSave |= ImGui.SliderInt("Duration X Offset", ref _plugin.Config.DurationX, -200, 200); + needSave |= ImGui.SliderInt("Duration Y Offset", ref _plugin.Config.DurationY, -200, 200); + needSave |= ImGui.SliderInt("Duration Font Size", ref _plugin.Config.FontSize, 1, 60); + needSave |= ImGui.SliderInt("Duration Padding", ref _plugin.Config.DurationPadding, -100, 100); + + needSave |= ImGui.ColorEdit4("Duration Text Color", ref _plugin.Config.DurationTextColor); + needSave |= ImGui.ColorEdit4("Duration Edge Color", ref _plugin.Config.DurationEdgeColor); } if (needSave) { _plugin.StatusNodeManager.LoadConfig(); - _plugin.Configuration.Save(); + _plugin.Config.Save(); } diff --git a/NamePlateDebuffs/Repo/nameplate.json b/NamePlateDebuffs/Repo/nameplate.json deleted file mode 100644 index 164f00e..0000000 --- a/NamePlateDebuffs/Repo/nameplate.json +++ /dev/null @@ -1,21 +0,0 @@ -[ - { - "Author": "aers, JHerig, squidmade, konviction", - "Name": "NamePlateDebuffsContinued", - "Punchline": "Displays debuffs you cast on nameplates of enemies", - "Description": "This is a Dalamud plugin to place debuff icons on nameplates of enemies in the field so one can see the status of debuffs on enemies other than the targeted enemy", - "Tags": [], - "InternalName": "NamePlateDebuffsContinued", - "RepoUrl": "https://github.com/Konscription/NamePlateDebuffs", - "DownloadCount": 0, - "LastUpdate": 1700439127865, - "DownloadLinkInstall": "https://github.com/Konscription/NamePlateDebuffs/releases/download/test/NamePlateDebuffs-Latest.zip", - "DownloadLinkUpdate": "https://github.com/Konscription/NamePlateDebuffs/releases/download/test/NamePlateDebuffs-Latest.zip", - "AssemblyVersion": "0.0.0.1", - "ApplicableVersion": "any", - "DalamudApiLevel": "9", - "Changelog": "", - "IconUrl": "https://github.com/Konscription/NamePlateDebuffs/blob/test/NamePlateDebuffs/Resources/icon.png", - "ImageUrls": [] - } -] \ No newline at end of file diff --git a/NamePlateDebuffs/StatusNode/StatusNode.cs b/NamePlateDebuffs/StatusNode/StatusNode.cs index 9abdb7c..d61cbc3 100644 --- a/NamePlateDebuffs/StatusNode/StatusNode.cs +++ b/NamePlateDebuffs/StatusNode/StatusNode.cs @@ -50,32 +50,32 @@ public void LoadConfig() { if (!Built()) return; - IconNode->AtkResNode.SetPositionShort((short)_plugin.Configuration.IconX, (short)_plugin.Configuration.IconY); - IconNode->AtkResNode.SetHeight((ushort)_plugin.Configuration.IconHeight); - IconNode->AtkResNode.SetWidth((ushort)_plugin.Configuration.IconWidth); - DurationNode->AtkResNode.SetPositionShort((short)_plugin.Configuration.DurationX, (short)_plugin.Configuration.DurationY); - DurationNode->FontSize = (byte) _plugin.Configuration.FontSize; + IconNode->AtkResNode.SetPositionShort((short)_plugin.Config.IconX, (short)_plugin.Config.IconY); + IconNode->AtkResNode.SetHeight((ushort)_plugin.Config.IconHeight); + IconNode->AtkResNode.SetWidth((ushort)_plugin.Config.IconWidth); + DurationNode->AtkResNode.SetPositionShort((short)_plugin.Config.DurationX, (short)_plugin.Config.DurationY); + DurationNode->FontSize = (byte) _plugin.Config.FontSize; ushort outWidth = 0; ushort outHeight = 0; DurationNode->GetTextDrawSize(&outWidth, &outHeight); - DurationNode->AtkResNode.SetWidth((ushort)(outWidth + 2 * _plugin.Configuration.DurationPadding)); - DurationNode->AtkResNode.SetHeight((ushort)(outHeight + 2 * _plugin.Configuration.DurationPadding)); + DurationNode->AtkResNode.SetWidth((ushort)(outWidth + 2 * _plugin.Config.DurationPadding)); + DurationNode->AtkResNode.SetHeight((ushort)(outHeight + 2 * _plugin.Config.DurationPadding)); - ushort iconHeight = (ushort)(_plugin.Configuration.IconY + _plugin.Configuration.IconHeight); - ushort durationHeight = (ushort)(_plugin.Configuration.DurationY + DurationNode->AtkResNode.Height); + ushort iconHeight = (ushort)(_plugin.Config.IconY + _plugin.Config.IconHeight); + ushort durationHeight = (ushort)(_plugin.Config.DurationY + DurationNode->AtkResNode.Height); RootNode->SetHeight(durationHeight > iconHeight ? durationHeight : iconHeight); - RootNode->SetWidth((ushort)(DurationNode->AtkResNode.Width > _plugin.Configuration.IconWidth ? DurationNode->AtkResNode.Width : _plugin.Configuration.IconWidth)); + RootNode->SetWidth((ushort)(DurationNode->AtkResNode.Width > _plugin.Config.IconWidth ? DurationNode->AtkResNode.Width : _plugin.Config.IconWidth)); - DurationNode->TextColor.R = (byte)(_plugin.Configuration.DurationTextColor.X * 255); - DurationNode->TextColor.G = (byte)(_plugin.Configuration.DurationTextColor.Y * 255); - DurationNode->TextColor.B = (byte)(_plugin.Configuration.DurationTextColor.Z * 255); - DurationNode->TextColor.A = (byte)(_plugin.Configuration.DurationTextColor.W * 255); + DurationNode->TextColor.R = (byte)(_plugin.Config.DurationTextColor.X * 255); + DurationNode->TextColor.G = (byte)(_plugin.Config.DurationTextColor.Y * 255); + DurationNode->TextColor.B = (byte)(_plugin.Config.DurationTextColor.Z * 255); + DurationNode->TextColor.A = (byte)(_plugin.Config.DurationTextColor.W * 255); - DurationNode->EdgeColor.R = (byte)(_plugin.Configuration.DurationEdgeColor.X * 255); - DurationNode->EdgeColor.G = (byte)(_plugin.Configuration.DurationEdgeColor.Y * 255); - DurationNode->EdgeColor.B = (byte)(_plugin.Configuration.DurationEdgeColor.Z * 255); - DurationNode->EdgeColor.A = (byte)(_plugin.Configuration.DurationEdgeColor.W * 255); + DurationNode->EdgeColor.R = (byte)(_plugin.Config.DurationEdgeColor.X * 255); + DurationNode->EdgeColor.G = (byte)(_plugin.Config.DurationEdgeColor.Y * 255); + DurationNode->EdgeColor.B = (byte)(_plugin.Config.DurationEdgeColor.Z * 255); + DurationNode->EdgeColor.A = (byte)(_plugin.Config.DurationEdgeColor.W * 255); } public bool Built() => RootNode != null && IconNode != null && DurationNode != null; diff --git a/NamePlateDebuffs/StatusNode/StatusNodeGroup.cs b/NamePlateDebuffs/StatusNode/StatusNodeGroup.cs index 05a980f..130db19 100644 --- a/NamePlateDebuffs/StatusNode/StatusNodeGroup.cs +++ b/NamePlateDebuffs/StatusNode/StatusNodeGroup.cs @@ -93,17 +93,17 @@ public void ForEachNode(Action func) public void LoadConfig() { - RootNode->SetPositionShort((short)_plugin.Configuration.GroupX, (short)_plugin.Configuration.GroupY); - RootNode->SetScale(_plugin.Configuration.Scale, _plugin.Configuration.Scale); + RootNode->SetPositionShort((short)_plugin.Config.GroupX, (short)_plugin.Config.GroupY); + RootNode->SetScale(_plugin.Config.Scale, _plugin.Config.Scale); - RootNode->SetWidth((ushort) (StatusNodes[0].RootNode->Width * NodePerGroupCount + _plugin.Configuration.NodeSpacing * (NodePerGroupCount - 1))); + RootNode->SetWidth((ushort) (StatusNodes[0].RootNode->Width * NodePerGroupCount + _plugin.Config.NodeSpacing * (NodePerGroupCount - 1))); RootNode->SetHeight(StatusNodes[0].RootNode->Height); for (int i = 0; i < NodePerGroupCount; i++) { if (StatusNodes[i] != null) { - StatusNodes[i].RootNode->SetPositionShort((short)((_plugin.Configuration.FillFromRight ? 3 - i : i) * (StatusNodes[0].RootNode->Width + _plugin.Configuration.NodeSpacing)), 0); + StatusNodes[i].RootNode->SetPositionShort((short)((_plugin.Config.FillFromRight ? 3 - i : i) * (StatusNodes[0].RootNode->Width + _plugin.Config.NodeSpacing)), 0); } } } From 29c3eac285e3fa2809c12c357e2bb8c32ca4d190 Mon Sep 17 00:00:00 2001 From: konviction Date: Sun, 19 Nov 2023 22:05:00 -0500 Subject: [PATCH 6/9] delete .gitmodules --- .gitmodules | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 8b13789..0000000 --- a/.gitmodules +++ /dev/null @@ -1 +0,0 @@ - From 5e0952f99b72e2333ff9aca9335f50da67836329 Mon Sep 17 00:00:00 2001 From: konviction Date: Sun, 19 Nov 2023 22:10:25 -0500 Subject: [PATCH 7/9] cleanup --- NamePlateDebuffs.sln | 8 ++++---- NamePlateDebuffs/AddonNamePlateHooks.cs | 3 +-- NamePlateDebuffs/NamePlateDebuffsPluginUI.cs | 6 +----- NamePlateDebuffs/PluginAddressResolver.cs | 2 -- NamePlateDebuffs/StatusNode/StatusNode.cs | 4 +--- NamePlateDebuffs/StatusNode/StatusNodeGroup.cs | 5 ++--- NamePlateDebuffs/StatusNode/StatusNodeManager.cs | 5 +---- 7 files changed, 10 insertions(+), 23 deletions(-) diff --git a/NamePlateDebuffs.sln b/NamePlateDebuffs.sln index b073f13..627c865 100644 --- a/NamePlateDebuffs.sln +++ b/NamePlateDebuffs.sln @@ -13,12 +13,12 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {782BF1DA-8527-49FC-8E37-82B7D7921354}.Debug|Any CPU.ActiveCfg = Debug|x64 - {782BF1DA-8527-49FC-8E37-82B7D7921354}.Debug|Any CPU.Build.0 = Debug|x64 + {782BF1DA-8527-49FC-8E37-82B7D7921354}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {782BF1DA-8527-49FC-8E37-82B7D7921354}.Debug|Any CPU.Build.0 = Debug|Any CPU {782BF1DA-8527-49FC-8E37-82B7D7921354}.Debug|x64.ActiveCfg = Debug|Any CPU {782BF1DA-8527-49FC-8E37-82B7D7921354}.Debug|x64.Build.0 = Debug|Any CPU - {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|Any CPU.ActiveCfg = Release|x64 - {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|Any CPU.Build.0 = Release|x64 + {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|Any CPU.ActiveCfg = Release|Any CPU + {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|Any CPU.Build.0 = Release|Any CPU {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|x64.ActiveCfg = Release|x64 {782BF1DA-8527-49FC-8E37-82B7D7921354}.Release|x64.Build.0 = Release|x64 EndGlobalSection diff --git a/NamePlateDebuffs/AddonNamePlateHooks.cs b/NamePlateDebuffs/AddonNamePlateHooks.cs index 04f3b16..0432bf2 100644 --- a/NamePlateDebuffs/AddonNamePlateHooks.cs +++ b/NamePlateDebuffs/AddonNamePlateHooks.cs @@ -1,5 +1,4 @@ -using Dalamud.Game.ClientState.Keys; -using Dalamud.Hooking; +using Dalamud.Hooking; using FFXIVClientStructs.FFXIV.Client.Game; using FFXIVClientStructs.FFXIV.Client.Game.Character; using FFXIVClientStructs.FFXIV.Client.System.Framework; diff --git a/NamePlateDebuffs/NamePlateDebuffsPluginUI.cs b/NamePlateDebuffs/NamePlateDebuffsPluginUI.cs index 71f1801..20db937 100644 --- a/NamePlateDebuffs/NamePlateDebuffsPluginUI.cs +++ b/NamePlateDebuffs/NamePlateDebuffsPluginUI.cs @@ -1,11 +1,7 @@ using ImGuiNET; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Numerics; -using Dalamud.Interface.Components; + namespace NamePlateDebuffs { diff --git a/NamePlateDebuffs/PluginAddressResolver.cs b/NamePlateDebuffs/PluginAddressResolver.cs index ea427d6..49e27ef 100644 --- a/NamePlateDebuffs/PluginAddressResolver.cs +++ b/NamePlateDebuffs/PluginAddressResolver.cs @@ -1,7 +1,5 @@ using Dalamud.Game; using System; -using Dalamud.Logging; -using NamePlateDebuffs; namespace NamePlateDebuffs { diff --git a/NamePlateDebuffs/StatusNode/StatusNode.cs b/NamePlateDebuffs/StatusNode/StatusNode.cs index d61cbc3..1cccf0c 100644 --- a/NamePlateDebuffs/StatusNode/StatusNode.cs +++ b/NamePlateDebuffs/StatusNode/StatusNode.cs @@ -1,6 +1,4 @@ -using Dalamud.Logging; -using Dalamud.Plugin; -using FFXIVClientStructs.FFXIV.Client.System.Memory; +using FFXIVClientStructs.FFXIV.Client.System.Memory; using FFXIVClientStructs.FFXIV.Component.GUI; namespace NamePlateDebuffs.StatusNode diff --git a/NamePlateDebuffs/StatusNode/StatusNodeGroup.cs b/NamePlateDebuffs/StatusNode/StatusNodeGroup.cs index 130db19..e3a288b 100644 --- a/NamePlateDebuffs/StatusNode/StatusNodeGroup.cs +++ b/NamePlateDebuffs/StatusNode/StatusNodeGroup.cs @@ -1,8 +1,7 @@ -using Dalamud.Plugin; -using FFXIVClientStructs.FFXIV.Client.System.Memory; +using FFXIVClientStructs.FFXIV.Client.System.Memory; using FFXIVClientStructs.FFXIV.Component.GUI; using System; -using Dalamud.Logging; + namespace NamePlateDebuffs.StatusNode { diff --git a/NamePlateDebuffs/StatusNode/StatusNodeManager.cs b/NamePlateDebuffs/StatusNode/StatusNodeManager.cs index d6f8c18..efbc34e 100644 --- a/NamePlateDebuffs/StatusNode/StatusNodeManager.cs +++ b/NamePlateDebuffs/StatusNode/StatusNodeManager.cs @@ -1,7 +1,4 @@ -using Dalamud.Hooking; -using Dalamud.Plugin; -using FFXIVClientStructs.FFXIV.Client.System.Memory; -using FFXIVClientStructs.FFXIV.Client.UI; +using FFXIVClientStructs.FFXIV.Client.UI; using FFXIVClientStructs.FFXIV.Component.GUI; using Lumina.Excel; using Lumina.Excel.GeneratedSheets; From 7eb3cf8c8dcc97e6be218ce69e1143efc6573f33 Mon Sep 17 00:00:00 2001 From: konviction Date: Sun, 19 Nov 2023 22:16:29 -0500 Subject: [PATCH 8/9] more cleanup --- NamePlateDebuffs/NamePlateDebuffsPlugin.cs | 22 ++++++++++++------- .../NamePlateDebuffsPluginConfig.cs | 3 +-- NamePlateDebuffs/NamePlateDebuffsPluginUI.cs | 8 +++---- NamePlateDebuffs/packages.lock.json | 3 --- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/NamePlateDebuffs/NamePlateDebuffsPlugin.cs b/NamePlateDebuffs/NamePlateDebuffsPlugin.cs index ab04841..2287997 100644 --- a/NamePlateDebuffs/NamePlateDebuffsPlugin.cs +++ b/NamePlateDebuffs/NamePlateDebuffsPlugin.cs @@ -12,9 +12,18 @@ public class NamePlateDebuffsPlugin : IDalamudPlugin { public string Name => "NamePlateDebuffs"; - [PluginService][RequiredVersion("1.0")] public DalamudPluginInterface PluginInterface { get; private set; } = null!; - [PluginService][RequiredVersion("1.0")] public IClientState ClientState { get; private set; } = null!; - [PluginService][RequiredVersion("1.0")] public static ICommandManager CommandManager { get; private set; } = null!; + [PluginService] + [RequiredVersion("1.0")] + public DalamudPluginInterface Interface { get; private set; } = null!; + + [PluginService] + [RequiredVersion("1.0")] + public IClientState ClientState { get; private set; } = null!; + + [PluginService] + [RequiredVersion("1.0")] + public static ICommandManager CommandManager { get; private set; } = null!; + [PluginService] public static IDataManager DataManager { get; private set; } = null!; [PluginService] public static IFramework Framework { get; private set; } = null!; [PluginService] public static IPluginLog Log { get; private set; } = null!; @@ -30,12 +39,9 @@ public class NamePlateDebuffsPlugin : IDalamudPlugin public NamePlateDebuffsPlugin() { - // load ECommons - //ECommonsMain.Init(PluginInterface, this, Module.DalamudReflector); - // load or create config - Config = PluginInterface.GetPluginConfig() as NamePlateDebuffsPluginConfig ?? new NamePlateDebuffsPluginConfig(); - Config.Initialize(PluginInterface); + Config = Interface.GetPluginConfig() as NamePlateDebuffsPluginConfig ?? new NamePlateDebuffsPluginConfig(); + Config.Initialize(Interface); Address = new PluginAddressResolver(); diff --git a/NamePlateDebuffs/NamePlateDebuffsPluginConfig.cs b/NamePlateDebuffs/NamePlateDebuffsPluginConfig.cs index e20d7c6..e46a45a 100644 --- a/NamePlateDebuffs/NamePlateDebuffsPluginConfig.cs +++ b/NamePlateDebuffs/NamePlateDebuffsPluginConfig.cs @@ -66,8 +66,7 @@ public void SetDefaults() DurationEdgeColor.W = 1; } - [NonSerialized] - private DalamudPluginInterface? _pluginInterface; + [NonSerialized] private DalamudPluginInterface? _pluginInterface; public void Initialize(DalamudPluginInterface pluginInterface) { diff --git a/NamePlateDebuffs/NamePlateDebuffsPluginUI.cs b/NamePlateDebuffs/NamePlateDebuffsPluginUI.cs index 20db937..bb2d417 100644 --- a/NamePlateDebuffs/NamePlateDebuffsPluginUI.cs +++ b/NamePlateDebuffs/NamePlateDebuffsPluginUI.cs @@ -17,14 +17,14 @@ public NamePlateDebuffsPluginUI(NamePlateDebuffsPlugin p) { _plugin = p; - _plugin.PluginInterface.UiBuilder.OpenConfigUi += UiBuilder_OnOpenConfigUi; - _plugin.PluginInterface.UiBuilder.Draw += UiBuilder_OnBuild; + _plugin.Interface.UiBuilder.OpenConfigUi += UiBuilder_OnOpenConfigUi; + _plugin.Interface.UiBuilder.Draw += UiBuilder_OnBuild; } public void Dispose() { - _plugin.PluginInterface.UiBuilder.OpenConfigUi -= UiBuilder_OnOpenConfigUi; - _plugin.PluginInterface.UiBuilder.Draw -= UiBuilder_OnBuild; + _plugin.Interface.UiBuilder.OpenConfigUi -= UiBuilder_OnOpenConfigUi; + _plugin.Interface.UiBuilder.Draw -= UiBuilder_OnBuild; } public void ToggleConfig() diff --git a/NamePlateDebuffs/packages.lock.json b/NamePlateDebuffs/packages.lock.json index b2eff6f..6cf1c73 100644 --- a/NamePlateDebuffs/packages.lock.json +++ b/NamePlateDebuffs/packages.lock.json @@ -7,9 +7,6 @@ "requested": "[2.1.12, )", "resolved": "2.1.12", "contentHash": "Sc0PVxvgg4NQjcI8n10/VfUQBAS4O+Fw2pZrAqBdRMbthYGeogzu5+xmIGCGmsEZ/ukMOBuAqiNiB5qA3MRalg==" - }, - "ecommons": { - "type": "Project" } } } From b244218e4d7a606dfc0542f4f2313b973800ff1c Mon Sep 17 00:00:00 2001 From: konviction Date: Sun, 19 Nov 2023 22:25:55 -0500 Subject: [PATCH 9/9] update version to 1.0.1.2 --- NamePlateDebuffs/NamePlateDebuffs.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NamePlateDebuffs/NamePlateDebuffs.csproj b/NamePlateDebuffs/NamePlateDebuffs.csproj index 5f68bd3..26548cb 100644 --- a/NamePlateDebuffs/NamePlateDebuffs.csproj +++ b/NamePlateDebuffs/NamePlateDebuffs.csproj @@ -3,7 +3,7 @@ NamePlateDebuffs - 1.0.1.1 + 1.0.1.2 aers, JHerig, squidmade https://github.com/jherig/NamePlateDebuffs