diff --git a/Penumbra/Interop/Loader/ResourceLoader.Replacement.cs b/Penumbra/Interop/Loader/ResourceLoader.Replacement.cs index 6a9fb9f3..8390d653 100644 --- a/Penumbra/Interop/Loader/ResourceLoader.Replacement.cs +++ b/Penumbra/Interop/Loader/ResourceLoader.Replacement.cs @@ -68,7 +68,7 @@ public unsafe partial class ResourceLoader } } - private event Action< Utf8GamePath, FullPath?, object? >? PathResolved; + private event Action< Utf8GamePath, ResourceType, FullPath?, object? >? PathResolved; private ResourceHandle* GetResourceHandler( bool isSync, ResourceManager* resourceManager, ResourceCategory* categoryId, ResourceType* resourceType, int* resourceHash, byte* path, GetResourceParameters* pGetResParams, bool isUnk ) @@ -85,7 +85,7 @@ public unsafe partial class ResourceLoader // If no replacements are being made, we still want to be able to trigger the event. var (resolvedPath, data) = ResolvePath( gamePath, *categoryId, *resourceType, *resourceHash ); - PathResolved?.Invoke( gamePath, resolvedPath, data ); + PathResolved?.Invoke( gamePath, *resourceType, resolvedPath, data ); if( resolvedPath == null ) { var retUnmodified = CallOriginalHandler( isSync, resourceManager, categoryId, resourceType, resourceHash, path, pGetResParams, isUnk ); diff --git a/Penumbra/Interop/Loader/ResourceLoader.TexMdl.cs b/Penumbra/Interop/Loader/ResourceLoader.TexMdl.cs index 42332f16..2393a87d 100644 --- a/Penumbra/Interop/Loader/ResourceLoader.TexMdl.cs +++ b/Penumbra/Interop/Loader/ResourceLoader.TexMdl.cs @@ -4,6 +4,7 @@ using Dalamud.Hooking; using Dalamud.Utility.Signatures; using FFXIVClientStructs.FFXIV.Client.System.Resource.Handle; using Penumbra.GameData.ByteString; +using Penumbra.GameData.Enums; namespace Penumbra.Interop.Loader; @@ -67,11 +68,11 @@ public unsafe partial class ResourceLoader : LoadMdlFileExternHook.Original( resourceHandle, unk1, unk2, ptr ); - private void AddCrc( Utf8GamePath _, FullPath? path, object? _2 ) + private void AddCrc( Utf8GamePath _, ResourceType type, FullPath? path, object? _2 ) { - if( path is { Extension: ".mdl" or ".tex" } p ) + if( path.HasValue && type is ResourceType.Mdl or ResourceType.Tex ) { - _customFileCrc.Add( p.Crc64 ); + _customFileCrc.Add( path.Value.Crc64 ); } }