From 1830af59fd98a884faf0474d7997cf748ff8f5a6 Mon Sep 17 00:00:00 2001 From: nebel <9887+nebel@users.noreply.github.com> Date: Fri, 29 Nov 2024 02:19:11 +0900 Subject: [PATCH] Use object table index lookup for NamePlateGui GameObject resolution (#2129) --- Dalamud/Game/Gui/NamePlate/NamePlateUpdateHandler.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dalamud/Game/Gui/NamePlate/NamePlateUpdateHandler.cs b/Dalamud/Game/Gui/NamePlate/NamePlateUpdateHandler.cs index 170fea687..94f185966 100644 --- a/Dalamud/Game/Gui/NamePlate/NamePlateUpdateHandler.cs +++ b/Dalamud/Game/Gui/NamePlate/NamePlateUpdateHandler.cs @@ -328,9 +328,9 @@ internal unsafe class NamePlateUpdateHandler : INamePlateUpdateHandler public ulong GameObjectId => this.gameObjectId ??= this.NamePlateInfo->ObjectId; /// - public IGameObject? GameObject => this.gameObject ??= this.context.ObjectTable.CreateObjectReference( - (nint)this.context.Ui3DModule->NamePlateObjectInfoPointers[ - this.ArrayIndex].Value->GameObject); + public IGameObject? GameObject => this.gameObject ??= this.context.ObjectTable[ + this.context.Ui3DModule->NamePlateObjectInfoPointers[this.ArrayIndex] + .Value->GameObject->ObjectIndex]; /// public IBattleChara? BattleChara => this.GameObject as IBattleChara;