Some stuff.

This commit is contained in:
Ottermandias 2023-04-07 00:29:19 +02:00
parent f85fc46fb7
commit 0ed1a81c29
2 changed files with 9 additions and 0 deletions

View file

@ -33,6 +33,7 @@ public class ActiveCollections : ISavable, IDisposable
Individuals = new IndividualCollections(actors.AwaitedService);
_communicator.CollectionChange.Subscribe(OnCollectionChange);
LoadCollections();
UpdateCurrentCollectionInUse();
}
public void Dispose()

View file

@ -6,6 +6,7 @@ using FFXIVClientStructs.FFXIV.Client.Graphics.Scene;
using Penumbra.GameData.Enums;
using Penumbra.GameData.Structs;
using Penumbra.Interop.Structs;
using CustomizeData = FFXIVClientStructs.FFXIV.Client.Game.Character.CustomizeData;
namespace Penumbra.Interop.ResourceTree;
@ -17,6 +18,10 @@ public class ResourceTree
public readonly string CollectionName;
public readonly List<ResourceNode> Nodes;
public int ModelId;
public CustomizeData CustomizeData;
public GenderRace RaceCode;
public ResourceTree(string name, nint sourceAddress, bool playerRelated, string collectionName)
{
Name = name;
@ -32,6 +37,9 @@ public class ResourceTree
var model = (CharacterBase*)character->GameObject.GetDrawObject();
var equipment = new ReadOnlySpan<CharacterArmor>(character->EquipSlotData, 10);
// var customize = new ReadOnlySpan<byte>( character->CustomizeData, 26 );
ModelId = character->ModelCharaId;
CustomizeData = character->DrawData.CustomizeData;
RaceCode = model->GetModelType() == CharacterBase.ModelType.Human ? (GenderRace) ((Human*)model)->RaceSexId : GenderRace.Unknown;
for (var i = 0; i < model->SlotCount; ++i)
{