mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Some glamourer additions.
This commit is contained in:
parent
6902ef48d1
commit
32e817d793
3 changed files with 178 additions and 154 deletions
2
OtterGui
2
OtterGui
|
|
@ -1 +1 @@
|
|||
Subproject commit bec5e2b1b9c9fa6c32c9e1aa0aec62210261b99d
|
||||
Subproject commit fcc5031fcf14b54f090d5bb789c580567b3f0023
|
||||
|
|
@ -2,9 +2,10 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Reflection.Metadata.Ecma335;
|
||||
|
||||
namespace Penumbra.GameData.Enums;
|
||||
|
||||
namespace Penumbra.GameData.Enums
|
||||
{
|
||||
public enum EquipSlot : byte
|
||||
{
|
||||
Unknown = 0,
|
||||
|
|
@ -34,6 +35,22 @@ namespace Penumbra.GameData.Enums
|
|||
|
||||
public static class EquipSlotExtensions
|
||||
{
|
||||
public static EquipSlot ToEquipSlot( this uint value )
|
||||
=> value switch
|
||||
{
|
||||
0 => EquipSlot.Head,
|
||||
1 => EquipSlot.Body,
|
||||
2 => EquipSlot.Hands,
|
||||
3 => EquipSlot.Legs,
|
||||
4 => EquipSlot.Feet,
|
||||
5 => EquipSlot.Ears,
|
||||
6 => EquipSlot.Neck,
|
||||
7 => EquipSlot.Wrists,
|
||||
8 => EquipSlot.RFinger,
|
||||
9 => EquipSlot.LFinger,
|
||||
_ => EquipSlot.Unknown,
|
||||
};
|
||||
|
||||
public static string ToSuffix( this EquipSlot value )
|
||||
{
|
||||
return value switch
|
||||
|
|
@ -158,4 +175,3 @@ namespace Penumbra.GameData.Enums
|
|||
{ EquipSlot.Wrists.ToSuffix(), EquipSlot.Wrists },
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -2,13 +2,21 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Penumbra.GameData.Structs;
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = 1 )]
|
||||
[StructLayout( LayoutKind.Explicit, Pack = 1 )]
|
||||
public readonly struct CharacterArmor
|
||||
{
|
||||
[FieldOffset( 0 )]
|
||||
public readonly SetId Set;
|
||||
|
||||
[FieldOffset( 2 )]
|
||||
public readonly byte Variant;
|
||||
|
||||
[FieldOffset( 3 )]
|
||||
public readonly StainId Stain;
|
||||
|
||||
[FieldOffset( 0 )]
|
||||
public readonly uint Value;
|
||||
|
||||
public override string ToString()
|
||||
=> $"{Set},{Variant},{Stain}";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue