mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-23 16:27:47 +01:00
Introduce Identifiers and strong entry types for each meta manipulation and use them in the manipulations.
This commit is contained in:
parent
ceed8531af
commit
2e9f184454
27 changed files with 533 additions and 163 deletions
|
|
@ -212,10 +212,10 @@ public sealed unsafe class ResolvePathHooksBase : IDisposable
|
|||
if (_parent.InInternalResolve)
|
||||
return DisposableContainer.Empty;
|
||||
|
||||
return new DisposableContainer(data.ModCollection.TemporarilySetEstFile(_parent.CharacterUtility, EstManipulation.EstType.Face),
|
||||
data.ModCollection.TemporarilySetEstFile(_parent.CharacterUtility, EstManipulation.EstType.Body),
|
||||
data.ModCollection.TemporarilySetEstFile(_parent.CharacterUtility, EstManipulation.EstType.Hair),
|
||||
data.ModCollection.TemporarilySetEstFile(_parent.CharacterUtility, EstManipulation.EstType.Head));
|
||||
return new DisposableContainer(data.ModCollection.TemporarilySetEstFile(_parent.CharacterUtility, EstType.Face),
|
||||
data.ModCollection.TemporarilySetEstFile(_parent.CharacterUtility, EstType.Body),
|
||||
data.ModCollection.TemporarilySetEstFile(_parent.CharacterUtility, EstType.Hair),
|
||||
data.ModCollection.TemporarilySetEstFile(_parent.CharacterUtility, EstType.Head));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -250,30 +250,30 @@ internal partial record ResolveContext
|
|||
_ => 0,
|
||||
};
|
||||
}
|
||||
return ResolveHumanExtraSkeletonData(characterRaceCode, EstManipulation.EstType.Face, faceId);
|
||||
return ResolveHumanExtraSkeletonData(characterRaceCode, EstType.Face, faceId);
|
||||
case 2:
|
||||
return ResolveHumanExtraSkeletonData(characterRaceCode, EstManipulation.EstType.Hair, human->HairId);
|
||||
return ResolveHumanExtraSkeletonData(characterRaceCode, EstType.Hair, human->HairId);
|
||||
case 3:
|
||||
return ResolveHumanEquipmentSkeletonData(EquipSlot.Head, EstManipulation.EstType.Head);
|
||||
return ResolveHumanEquipmentSkeletonData(EquipSlot.Head, EstType.Head);
|
||||
case 4:
|
||||
return ResolveHumanEquipmentSkeletonData(EquipSlot.Body, EstManipulation.EstType.Body);
|
||||
return ResolveHumanEquipmentSkeletonData(EquipSlot.Body, EstType.Body);
|
||||
default:
|
||||
return (0, string.Empty, 0);
|
||||
}
|
||||
}
|
||||
|
||||
private unsafe (GenderRace RaceCode, string Slot, PrimaryId Set) ResolveHumanEquipmentSkeletonData(EquipSlot slot, EstManipulation.EstType type)
|
||||
private unsafe (GenderRace RaceCode, string Slot, PrimaryId Set) ResolveHumanEquipmentSkeletonData(EquipSlot slot, EstType type)
|
||||
{
|
||||
var human = (Human*)CharacterBase;
|
||||
var equipment = ((CharacterArmor*)&human->Head)[slot.ToIndex()];
|
||||
return ResolveHumanExtraSkeletonData(ResolveEqdpRaceCode(slot, equipment.Set), type, equipment.Set);
|
||||
}
|
||||
|
||||
private (GenderRace RaceCode, string Slot, PrimaryId Set) ResolveHumanExtraSkeletonData(GenderRace raceCode, EstManipulation.EstType type, PrimaryId primary)
|
||||
private (GenderRace RaceCode, string Slot, PrimaryId Set) ResolveHumanExtraSkeletonData(GenderRace raceCode, EstType type, PrimaryId primary)
|
||||
{
|
||||
var metaCache = Global.Collection.MetaCache;
|
||||
var skeletonSet = metaCache?.GetEstEntry(type, raceCode, primary) ?? default;
|
||||
return (raceCode, EstManipulation.ToName(type), skeletonSet);
|
||||
return (raceCode, EstManipulation.ToName(type), skeletonSet.AsId);
|
||||
}
|
||||
|
||||
private unsafe Utf8GamePath ResolveSkeletonPathNative(uint partialSkeletonIndex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue