From ea55d9cb0364894f9a7953f9c434df0f17f42b11 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Sat, 30 Sep 2023 23:29:41 +0200 Subject: [PATCH] Fix some issues with weapons in automated designs. --- Glamourer/Automation/AutoDesignApplier.cs | 26 +++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Glamourer/Automation/AutoDesignApplier.cs b/Glamourer/Automation/AutoDesignApplier.cs index 256a8a7..4209d58 100644 --- a/Glamourer/Automation/AutoDesignApplier.cs +++ b/Glamourer/Automation/AutoDesignApplier.cs @@ -339,17 +339,17 @@ public class AutoDesignApplier : IDisposable var checkState = !respectManual || state[EquipSlot.MainHand, false] is not StateChanged.Source.Manual; if (checkUnlock && checkState) { - if (state.ModelData.Item(EquipSlot.MainHand).Type == item.Type) - { - _state.ChangeItem(state, EquipSlot.MainHand, item, source); - totalEquipFlags |= EquipFlag.Mainhand; - } - else if (fromJobChange) + if (fromJobChange) { _jobChangeMainhand = item; _jobChangeState = state; totalEquipFlags |= EquipFlag.Mainhand; } + else if (state.ModelData.Item(EquipSlot.MainHand).Type == item.Type) + { + _state.ChangeItem(state, EquipSlot.MainHand, item, source); + totalEquipFlags |= EquipFlag.Mainhand; + } } } @@ -360,16 +360,16 @@ public class AutoDesignApplier : IDisposable var checkState = !respectManual || state[EquipSlot.OffHand, false] is not StateChanged.Source.Manual; if (checkUnlock && checkState) { - if (state.ModelData.Item(EquipSlot.OffHand).Type == item.Type) - { - _state.ChangeItem(state, EquipSlot.OffHand, item, source); - totalEquipFlags |= EquipFlag.Mainhand; - } - else if (fromJobChange) + if (fromJobChange) { _jobChangeOffhand = item; _jobChangeState = state; - totalEquipFlags |= EquipFlag.Mainhand; + totalEquipFlags |= EquipFlag.Offhand; + } + else if (state.ModelData.Item(EquipSlot.OffHand).Type == item.Type) + { + _state.ChangeItem(state, EquipSlot.OffHand, item, source); + totalEquipFlags |= EquipFlag.Offhand; } } }