diff --git a/Glamourer/Api/GlamourerIpc.cs b/Glamourer/Api/GlamourerIpc.cs index 98e2f3a..6213d96 100644 --- a/Glamourer/Api/GlamourerIpc.cs +++ b/Glamourer/Api/GlamourerIpc.cs @@ -5,10 +5,6 @@ using Dalamud.Logging; using Dalamud.Plugin; using Dalamud.Plugin.Ipc; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Glamourer.Api { @@ -18,16 +14,16 @@ namespace Glamourer.Api public const string LabelProviderApplyCharacterCustomization = "Glamourer.ApplyCharacterCustomization"; private readonly ClientState clientState; private readonly ObjectTable objectTable; - private readonly DalamudPluginInterface pi; + private readonly DalamudPluginInterface pluginInterface; internal ICallGateProvider? ProviderGetCharacterCustomization; internal ICallGateProvider? ProviderApplyCharacterCustomization; - public GlamourerIpc(ClientState clientState, ObjectTable objectTable, DalamudPluginInterface pi) + public GlamourerIpc(ClientState clientState, ObjectTable objectTable, DalamudPluginInterface pluginInterface) { this.clientState = clientState; this.objectTable = objectTable; - this.pi = pi; + this.pluginInterface = pluginInterface; InitializeProviders(); } @@ -47,7 +43,7 @@ namespace Glamourer.Api { try { - ProviderGetCharacterCustomization = pi.GetIpcProvider(LabelProviderGetCharacterCustomization); + ProviderGetCharacterCustomization = pluginInterface.GetIpcProvider(LabelProviderGetCharacterCustomization); ProviderGetCharacterCustomization.RegisterFunc(GetCharacterCustomization); } catch (Exception ex) @@ -57,7 +53,7 @@ namespace Glamourer.Api try { - ProviderApplyCharacterCustomization = pi.GetIpcProvider(LabelProviderApplyCharacterCustomization); + ProviderApplyCharacterCustomization = pluginInterface.GetIpcProvider(LabelProviderApplyCharacterCustomization); ProviderApplyCharacterCustomization.RegisterAction((customization, characterName) => ApplyCharacterCustomization(customization, characterName)); } catch (Exception ex) diff --git a/Glamourer/Glamourer.cs b/Glamourer/Glamourer.cs index 97dc048..c20ca21 100644 --- a/Glamourer/Glamourer.cs +++ b/Glamourer/Glamourer.cs @@ -203,6 +203,7 @@ namespace Glamourer Penumbra.Dispose(); PlayerWatcher.Dispose(); _interface.Dispose(); + GlamourerIpc.Dispose(); Dalamud.Commands.RemoveHandler("/glamour"); Dalamud.Commands.RemoveHandler("/glamourer"); }