diff --git a/Glamourer/Gui/Equipment/EquipDrawData.cs b/Glamourer/Gui/Equipment/EquipDrawData.cs index 67c6a9e..e6b5d0d 100644 --- a/Glamourer/Gui/Equipment/EquipDrawData.cs +++ b/Glamourer/Gui/Equipment/EquipDrawData.cs @@ -14,6 +14,12 @@ public struct EquipDrawData(EquipSlot slot, in DesignData designData) public bool DisplayApplication; public bool AllowRevert; + public readonly bool IsDesign + => _object is Design; + + public readonly bool IsState + => _object is ActorState; + public readonly void SetItem(EquipItem item) => _editor.ChangeItem(_object, Slot, item, ApplySettings.Manual); diff --git a/Glamourer/Gui/Equipment/EquipmentDrawer.cs b/Glamourer/Gui/Equipment/EquipmentDrawer.cs index 0e47839..53c3d3e 100644 --- a/Glamourer/Gui/Equipment/EquipmentDrawer.cs +++ b/Glamourer/Gui/Equipment/EquipmentDrawer.cs @@ -285,7 +285,7 @@ public class EquipmentDrawer ImGui.SameLine(); DrawApplyStain(equipDrawData); } - else + else if (equipDrawData.IsState) { _advancedDyes.DrawButton(equipDrawData.Slot); } @@ -309,7 +309,7 @@ public class EquipmentDrawer ImGui.SameLine(); DrawApplyStain(mainhand); } - else + else if (mainhand.IsState) { _advancedDyes.DrawButton(EquipSlot.MainHand); } @@ -331,7 +331,7 @@ public class EquipmentDrawer ImGui.SameLine(); DrawApplyStain(offhand); } - else + else if (offhand.IsState) { _advancedDyes.DrawButton(EquipSlot.OffHand); } @@ -365,7 +365,7 @@ public class EquipmentDrawer ImGui.SameLine(); DrawApplyStain(equipDrawData); } - else + else if (equipDrawData.IsState) { _advancedDyes.DrawButton(equipDrawData.Slot); } @@ -402,7 +402,7 @@ public class EquipmentDrawer ImGui.SameLine(); DrawApplyStain(mainhand); } - else + else if (mainhand.IsState) { _advancedDyes.DrawButton(EquipSlot.MainHand); } @@ -432,7 +432,7 @@ public class EquipmentDrawer ImGui.SameLine(); DrawApplyStain(offhand); } - else + else if (mainhand.IsState) { _advancedDyes.DrawButton(EquipSlot.OffHand); } diff --git a/Glamourer/Interop/InventoryService.cs b/Glamourer/Interop/InventoryService.cs index c5689fa..6871ed9 100644 --- a/Glamourer/Interop/InventoryService.cs +++ b/Glamourer/Interop/InventoryService.cs @@ -10,7 +10,7 @@ using Penumbra.String; namespace Glamourer.Interop; -public unsafe class InventoryService : IDisposable, IRequiredService +public sealed unsafe class InventoryService : IDisposable, IRequiredService { private readonly MovedEquipment _movedItemsEvent; private readonly EquippedGearset _gearsetEvent;