mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +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
31
Penumbra.GameData/Data/MaterialHandling.cs
Normal file
31
Penumbra.GameData/Data/MaterialHandling.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.GameData.Structs;
|
||||
|
||||
namespace Penumbra.GameData.Data;
|
||||
|
||||
public static class MaterialHandling
|
||||
{
|
||||
public static GenderRace GetGameGenderRace(GenderRace actualGr, SetId hairId)
|
||||
{
|
||||
// Hrothgar do not share hairstyles.
|
||||
if (actualGr is GenderRace.HrothgarFemale or GenderRace.HrothgarMale)
|
||||
return actualGr;
|
||||
|
||||
// Some hairstyles are miqo'te specific but otherwise shared.
|
||||
if (hairId.Value is >= 101 and <= 115)
|
||||
{
|
||||
if (actualGr is GenderRace.MiqoteFemale or GenderRace.MiqoteMale)
|
||||
return actualGr;
|
||||
|
||||
return actualGr.Split().Item1 == Gender.Female ? GenderRace.MidlanderFemale : GenderRace.MidlanderMale;
|
||||
}
|
||||
|
||||
// All hairstyles above 116 are shared except for Hrothgar
|
||||
if (hairId.Value is >= 116 and <= 200)
|
||||
{
|
||||
return actualGr.Split().Item1 == Gender.Female ? GenderRace.MidlanderFemale : GenderRace.MidlanderMale;
|
||||
}
|
||||
|
||||
return actualGr;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue