ClientStructs-ify ResourceTree stuff

This commit is contained in:
Exter-N 2025-07-05 05:20:24 +02:00
parent a97d9e4953
commit 278bf43b29

View file

@ -70,8 +70,7 @@ public class ResourceTree(
var genericContext = globalContext.CreateContext(model);
// TODO ClientStructs-ify (aers/FFXIVClientStructs#1312)
var mpapArrayPtr = *(ResourceHandle***)((nint)model + 0x948);
var mpapArrayPtr = model->MaterialAnimationPacks;
var mpapArray = mpapArrayPtr is not null ? new ReadOnlySpan<Pointer<ResourceHandle>>(mpapArrayPtr, model->SlotCount) : [];
// TODO ClientStructs-ify (aers/FFXIVClientStructs#1474)
var skinMtrlArray = modelType switch
@ -124,8 +123,7 @@ public class ResourceTree(
}
AddSkeleton(Nodes, genericContext, model->EID, model->Skeleton, model->BonePhysicsModule);
// TODO ClientStructs-ify (aers/FFXIVClientStructs#1312)
AddMaterialAnimationSkeleton(Nodes, genericContext, *(SkeletonResourceHandle**)((nint)model + 0x940));
AddMaterialAnimationSkeleton(Nodes, genericContext, model->MaterialAnimationSkeleton);
AddWeapons(globalContext, model);
@ -156,8 +154,7 @@ public class ResourceTree(
var genericContext = globalContext.CreateContext(subObject, 0xFFFFFFFFu, slot, equipment, weaponType);
// TODO ClientStructs-ify (aers/FFXIVClientStructs#1312)
var mpapArrayPtr = *(ResourceHandle***)((nint)subObject + 0x948);
var mpapArrayPtr = subObject->MaterialAnimationPacks;
var mpapArray = mpapArrayPtr is not null ? new ReadOnlySpan<Pointer<ResourceHandle>>(mpapArrayPtr, subObject->SlotCount) : [];
for (var i = 0; i < subObject->SlotCount; ++i)
@ -184,8 +181,7 @@ public class ResourceTree(
AddSkeleton(weaponNodes, genericContext, subObject->EID, subObject->Skeleton, subObject->BonePhysicsModule,
$"Weapon #{weaponIndex}, ");
// TODO ClientStructs-ify (aers/FFXIVClientStructs#1312)
AddMaterialAnimationSkeleton(weaponNodes, genericContext, *(SkeletonResourceHandle**)((nint)subObject + 0x940),
AddMaterialAnimationSkeleton(weaponNodes, genericContext, subObject->MaterialAnimationSkeleton,
$"Weapon #{weaponIndex}, ");
++weaponIndex;
@ -263,7 +259,7 @@ public class ResourceTree(
for (var i = 0; i < skeleton->PartialSkeletonCount; ++i)
{
// TODO ClientStructs-ify (aers/FFXIVClientStructs#1312)
// TODO ClientStructs-ify (aers/FFXIVClientStructs#1475)
var phybHandle = physics != null ? ((ResourceHandle**)((nint)physics + 0x190))[i] : null;
if (context.CreateNodeFromPartialSkeleton(&skeleton->PartialSkeletons[i], phybHandle, (uint)i) is { } sklbNode)
{