UiDebug2 Misc Fixes (#2273)

* Fix incorrect type check

* Fix address calculation
This commit is contained in:
MidoriKami 2025-05-23 15:44:24 -07:00 committed by GitHub
parent 15352a3e23
commit 43ab6f6f63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -86,7 +86,7 @@ internal unsafe partial class ResNodeTree : IDisposable
/// <returns>An existing or newly-created instance of <see cref="ResNodeTree"/>.</returns>
internal static ResNodeTree GetOrCreate(AtkResNode* node, AddonTree addonTree) =>
addonTree.NodeTrees.TryGetValue((nint)node, out var nodeTree) ? nodeTree
: (int)node->Type > 1000
: (int)node->Type >= 1000
? new ComponentNodeTree(node, addonTree)
: node->Type switch
{

View file

@ -78,7 +78,7 @@ public readonly unsafe partial struct TimelineTree
{
var animation = this.Resource->Animations[a];
var isActive = this.ActiveAnimation != null && &animation == this.ActiveAnimation;
this.PrintAnimation(animation, a, isActive, (nint)(this.NodeTimeline->Resource->Animations + (a * sizeof(AtkTimelineAnimation))));
this.PrintAnimation(animation, a, isActive, (nint)(this.NodeTimeline->Resource->Animations + a));
}
}
}