mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-02 05:43:42 +01:00
Add basic version of item swap, seemingly working for hair, tail and ears.
This commit is contained in:
parent
e534ce37d5
commit
5b3d5d1e67
22 changed files with 1730 additions and 120 deletions
|
|
@ -198,6 +198,25 @@ public readonly struct MetaManipulation : IEquatable< MetaManipulation >, ICompa
|
|||
};
|
||||
}
|
||||
|
||||
public MetaManipulation WithEntryOf( MetaManipulation other )
|
||||
{
|
||||
if( ManipulationType != other.ManipulationType )
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
return ManipulationType switch
|
||||
{
|
||||
Type.Eqp => Eqp.Copy( other.Eqp.Entry ),
|
||||
Type.Gmp => Gmp.Copy( other.Gmp.Entry ),
|
||||
Type.Eqdp => Eqdp.Copy( other.Eqdp.Entry ),
|
||||
Type.Est => Est.Copy( other.Est.Entry ),
|
||||
Type.Rsp => Rsp.Copy( other.Rsp.Entry ),
|
||||
Type.Imc => Imc.Copy( other.Imc.Entry ),
|
||||
_ => throw new ArgumentOutOfRangeException(),
|
||||
};
|
||||
}
|
||||
|
||||
public override bool Equals( object? obj )
|
||||
=> obj is MetaManipulation other && Equals( other );
|
||||
|
||||
|
|
@ -237,8 +256,8 @@ public readonly struct MetaManipulation : IEquatable< MetaManipulation >, ICompa
|
|||
=> ManipulationType switch
|
||||
{
|
||||
Type.Imc => $"{Imc.Entry.DecalId}-{Imc.Entry.MaterialId}-{Imc.Entry.VfxId}-{Imc.Entry.SoundId}-{Imc.Entry.MaterialAnimationId}-{Imc.Entry.AttributeMask}",
|
||||
Type.Eqdp => $"{(ushort) Eqdp.Entry:X}",
|
||||
Type.Eqp => $"{(ulong)Eqp.Entry:X}",
|
||||
Type.Eqdp => $"{( ushort )Eqdp.Entry:X}",
|
||||
Type.Eqp => $"{( ulong )Eqp.Entry:X}",
|
||||
Type.Est => $"{Est.Entry}",
|
||||
Type.Gmp => $"{Gmp.Entry.Value}",
|
||||
Type.Rsp => $"{Rsp.Entry}",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue