mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-01-03 06:13:45 +01:00
Add handling for Monk fist weapon hack, remove LoadEquipment hooks, and add item movement and plate apply hooks instead.
This commit is contained in:
parent
323924fba2
commit
5874688838
19 changed files with 403 additions and 128 deletions
|
|
@ -169,6 +169,7 @@ public class StateManager : IReadOnlyDictionary<ActorIdentifier, ActorState>
|
|||
|
||||
main = actor.GetMainhand();
|
||||
off = actor.GetOffhand();
|
||||
FistWeaponHack(ref ret, ref main, ref off);
|
||||
ret.SetVisor(actor.AsCharacter->DrawData.IsVisorToggled);
|
||||
}
|
||||
|
||||
|
|
@ -190,6 +191,19 @@ public class StateManager : IReadOnlyDictionary<ActorIdentifier, ActorState>
|
|||
return ret;
|
||||
}
|
||||
|
||||
/// <summary> This is hardcoded in the game. </summary>
|
||||
private void FistWeaponHack(ref DesignData ret, ref CharacterWeapon mainhand, ref CharacterWeapon offhand)
|
||||
{
|
||||
if (mainhand.Set.Value is < 1601 or >= 1651)
|
||||
return;
|
||||
|
||||
var gauntlets = _items.Identify(EquipSlot.Hands, offhand.Set, 0, (byte)offhand.Variant);
|
||||
offhand.Set = (SetId)(mainhand.Set.Value + 50);
|
||||
offhand.Variant = mainhand.Variant;
|
||||
offhand.Type = mainhand.Type;
|
||||
ret.SetItem(EquipSlot.Hands, gauntlets);
|
||||
}
|
||||
|
||||
#region Change Values
|
||||
|
||||
/// <summary> Turn an actor human. </summary>
|
||||
|
|
@ -433,7 +447,8 @@ public class StateManager : IReadOnlyDictionary<ActorIdentifier, ActorState>
|
|||
if (!GetOrCreate(actor, out var state))
|
||||
return;
|
||||
|
||||
ApplyAll(state, !actor.Model.IsHuman || Customize.Compare(actor.Model.GetCustomize(), state.ModelData.Customize).RequiresRedraw(), false);
|
||||
ApplyAll(state, !actor.Model.IsHuman || Customize.Compare(actor.Model.GetCustomize(), state.ModelData.Customize).RequiresRedraw(),
|
||||
false);
|
||||
}
|
||||
|
||||
public void DeleteState(ActorIdentifier identifier)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue