From e0000c9ef90015d80ca76e67a3a329965e93b753 Mon Sep 17 00:00:00 2001 From: Stanley Dimant Date: Sat, 3 Sep 2022 16:17:01 +0200 Subject: [PATCH] remove ottergui from material --- Penumbra/Interop/Resolver/PathResolver.Material.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Penumbra/Interop/Resolver/PathResolver.Material.cs b/Penumbra/Interop/Resolver/PathResolver.Material.cs index 485eb790..b4a6c494 100644 --- a/Penumbra/Interop/Resolver/PathResolver.Material.cs +++ b/Penumbra/Interop/Resolver/PathResolver.Material.cs @@ -1,10 +1,10 @@ using System; using System.Diagnostics.CodeAnalysis; +using System.Linq; using Dalamud.Hooking; using Dalamud.Logging; using Dalamud.Utility.Signatures; using FFXIVClientStructs.FFXIV.Client.System.Resource; -using OtterGui; using Penumbra.Collections; using Penumbra.GameData.ByteString; using Penumbra.GameData.Enums; @@ -97,11 +97,9 @@ public unsafe partial class PathResolver #if DEBUG PluginLog.Verbose( "Using MtrlLoadHandler with collection {$Split:l} for path {$Path:l}.", name, path ); #endif - IntPtr gameObjAddr = IntPtr.Zero; - if ( Dalamud.Objects.FindFirst(f => f.Name.TextValue == name, out var gameObj ) ) - { - gameObjAddr = gameObj.Address; - } + + var objFromObjTable = Dalamud.Objects.FirstOrDefault( f => f.Name.TextValue == name ); + IntPtr gameObjAddr = objFromObjTable?.Address ?? IntPtr.Zero; _paths.SetCollection( gameObjAddr, path, collection ); } else