diff --git a/Glamourer/State/StateListener.cs b/Glamourer/State/StateListener.cs index 8742c76..9082ce4 100644 --- a/Glamourer/State/StateListener.cs +++ b/Glamourer/State/StateListener.cs @@ -352,9 +352,10 @@ public class StateListener : IDisposable } var actorArmor = actor.GetArmor(slot); + var fistWeapon = FistWeaponGauntletHack(); // The actor armor does not correspond to the model armor, thus the actor is transformed. // This also prevents it from changing values due to hat state. - if (actorArmor.Value != armor.Value && !FistWeaponGauntletHack()) + if (actorArmor.Value != armor.Value && !fistWeapon) return UpdateState.Transformed; var baseData = state.BaseData.Armor(slot); @@ -365,7 +366,7 @@ public class StateListener : IDisposable change = UpdateState.Change; } - if (baseData.Set.Id != armor.Set.Id || baseData.Variant != armor.Variant) + if (baseData.Set.Id != armor.Set.Id || (baseData.Variant != armor.Variant && !fistWeapon)) { var item = _items.Identify(slot, armor.Set, armor.Variant); state.BaseData.SetItem(slot, item); @@ -408,11 +409,15 @@ public class StateListener : IDisposable } /// Update base data for a single changed weapon slot. - private UpdateState UpdateBaseData(Actor _, ActorState state, EquipSlot slot, CharacterWeapon weapon) + private UpdateState UpdateBaseData(Actor actor, ActorState state, EquipSlot slot, CharacterWeapon weapon) { var baseData = state.BaseData.Weapon(slot); var change = UpdateState.NoChange; + // Fist weapon bug hack + if (slot is EquipSlot.OffHand && weapon.Value == 0 && actor.GetMainhand().Set.Id is > 1600 and < 1651) + return UpdateState.NoChange; + if (baseData.Stain != weapon.Stain) { state.BaseData.SetStain(slot, weapon.Stain); diff --git a/Glamourer/State/StateManager.cs b/Glamourer/State/StateManager.cs index dc4971d..07e4fc0 100644 --- a/Glamourer/State/StateManager.cs +++ b/Glamourer/State/StateManager.cs @@ -206,11 +206,12 @@ public class StateManager : IReadOnlyDictionary if (mainhand.Set.Id is < 1601 or >= 1651) return; - var gauntlets = _items.Identify(EquipSlot.Hands, offhand.Set, 0, offhand.Variant); + var gauntlets = _items.Identify(EquipSlot.Hands, offhand.Set, (Variant) offhand.Type.Id); offhand.Set = (SetId)(mainhand.Set.Id + 50); offhand.Variant = mainhand.Variant; offhand.Type = mainhand.Type; ret.SetItem(EquipSlot.Hands, gauntlets); + ret.SetStain(EquipSlot.Hands, mainhand.Stain); } #region Change Values