diff --git a/Glamourer/Gui/Tabs/AutomationTab/SetPanel.cs b/Glamourer/Gui/Tabs/AutomationTab/SetPanel.cs index 0c51f5b..3c8b73f 100644 --- a/Glamourer/Gui/Tabs/AutomationTab/SetPanel.cs +++ b/Glamourer/Gui/Tabs/AutomationTab/SetPanel.cs @@ -5,13 +5,11 @@ using System.Text; using Dalamud.Interface; using Glamourer.Automation; using Glamourer.Customization; -using Glamourer.Designs; using Glamourer.Interop; using Glamourer.Services; using Glamourer.Structs; using Glamourer.Unlocks; using ImGuiNET; -using Lumina.Excel.GeneratedSheets; using OtterGui; using OtterGui.Raii; using OtterGui.Widgets; @@ -192,7 +190,7 @@ public class SetPanel if (!equipFlags.HasFlag(flag)) continue; - var item = design.Design.DesignData.Item(slot); + var item = design.Design!.DesignData.Item(slot); if (!_itemUnlocks.IsUnlocked(item.ItemId, out _)) sb.AppendLine($"{item.Name} in {slot.ToName()} slot is not unlocked. Consider obtaining it via gameplay means!"); } @@ -227,7 +225,7 @@ public class SetPanel sb.Clear(); var sb2 = new StringBuilder(); - var customize = design.Design.DesignData.Customize; + var customize = design.Design!.DesignData.Customize; if (!design.Design.DesignData.IsHuman) sb.AppendLine("The base model id can not be changed automatically to something non-human."); diff --git a/Glamourer/State/StateApplier.cs b/Glamourer/State/StateApplier.cs index 94fa700..9d61aca 100644 --- a/Glamourer/State/StateApplier.cs +++ b/Glamourer/State/StateApplier.cs @@ -50,10 +50,7 @@ public class StateApplier { var data = GetData(state); if (apply) - { - state.TempLock(); ForceRedraw(data); - } return data; } @@ -76,10 +73,7 @@ public class StateApplier _changeCustomize.UpdateCustomize(mdl, customize.Data); } else - { - state?.TempLock(); _penumbra.RedrawObject(actor, RedrawType.Redraw); - } } } diff --git a/Glamourer/State/StateManager.cs b/Glamourer/State/StateManager.cs index 485df94..23ecebc 100644 --- a/Glamourer/State/StateManager.cs +++ b/Glamourer/State/StateManager.cs @@ -377,7 +377,6 @@ public class StateManager : IReadOnlyDictionary var actors = _applier.ChangeWetness(state, true); if (redraw) { - state.TempLock(); _applier.ForceRedraw(actors); } else @@ -419,7 +418,12 @@ public class StateManager : IReadOnlyDictionary foreach (var type in Enum.GetValues()) state[type] = StateChanged.Source.Game; - var actors = source is StateChanged.Source.Manual or StateChanged.Source.Ipc ? ApplyAll(state, redraw) : ActorData.Invalid; + var actors = ActorData.Invalid; + if (source is StateChanged.Source.Manual or StateChanged.Source.Ipc) + { + state.TempLock(); + actors = ApplyAll(state, redraw); + } Glamourer.Log.Verbose( $"Reset entire state of {state.Identifier.Incognito(null)} to game base. [Affecting {actors.ToLazyString("nothing")}.]"); _event.Invoke(StateChanged.Type.Design, StateChanged.Source.Manual, state, actors, null);