mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 18:27:24 +01:00
Fix some stuff to deal with SEs fucked fist weapon bug.
This commit is contained in:
parent
3f8831853a
commit
53db0de066
2 changed files with 10 additions and 4 deletions
|
|
@ -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
|
|||
}
|
||||
|
||||
/// <summary> Update base data for a single changed weapon slot. </summary>
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -206,11 +206,12 @@ public class StateManager : IReadOnlyDictionary<ActorIdentifier, ActorState>
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue