From 24be9d517f7715c9828cdc5e798a96a12abd7dd7 Mon Sep 17 00:00:00 2001 From: Anna Clemens Date: Wed, 11 Jan 2023 15:00:39 -0500 Subject: [PATCH] chore: bump version to 1.4.10 --- SoundFilter/Filter.cs | 11 ++++++----- SoundFilter/SoundFilter.csproj | 10 +++++----- SoundFilter/packages.lock.json | 16 ++++++++-------- 3 files changed, 19 insertions(+), 18 deletions(-) mode change 100644 => 100755 SoundFilter/packages.lock.json diff --git a/SoundFilter/Filter.cs b/SoundFilter/Filter.cs index 18f17d4..ac57f7f 100755 --- a/SoundFilter/Filter.cs +++ b/SoundFilter/Filter.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Runtime.InteropServices; using Dalamud.Hooking; using Dalamud.Logging; +using FFXIVClientStructs.FFXIV.Client.System.Framework; using FFXIVClientStructs.FFXIV.Client.System.Resource.Handle; namespace SoundFilter { @@ -65,7 +66,7 @@ namespace SoundFilter { } var offset = *(int*) (instructionPtr + 3); - return *(IntPtr*) (this.Plugin.Framework.Address.BaseAddress + offset); + return *(IntPtr*) ((IntPtr) Framework.Instance() + offset); } } @@ -130,19 +131,19 @@ namespace SoundFilter { internal void Enable() { if (this.PlaySpecificSoundHook == null && this.Plugin.SigScanner.TryScanText(Signatures.PlaySpecificSound, out var playPtr)) { - this.PlaySpecificSoundHook = new Hook(playPtr, this.PlaySpecificSoundDetour); + this.PlaySpecificSoundHook = Hook.FromAddress(playPtr, this.PlaySpecificSoundDetour); } if (this.GetResourceSyncHook == null && this.Plugin.SigScanner.TryScanText(Signatures.GetResourceSync, out var syncPtr)) { - this.GetResourceSyncHook = new Hook(syncPtr, this.GetResourceSyncDetour); + this.GetResourceSyncHook = Hook.FromAddress(syncPtr, this.GetResourceSyncDetour); } if (this.GetResourceAsyncHook == null && this.Plugin.SigScanner.TryScanText(Signatures.GetResourceAsync, out var asyncPtr)) { - this.GetResourceAsyncHook = new Hook(asyncPtr, this.GetResourceAsyncDetour); + this.GetResourceAsyncHook = Hook.FromAddress(asyncPtr, this.GetResourceAsyncDetour); } if (this.LoadSoundFileHook == null && this.Plugin.SigScanner.TryScanText(Signatures.LoadSoundFile, out var soundPtr)) { - this.LoadSoundFileHook = new Hook(soundPtr, this.LoadSoundFileDetour); + this.LoadSoundFileHook = Hook.FromAddress(soundPtr, this.LoadSoundFileDetour); } this.PlaySpecificSoundHook?.Enable(); diff --git a/SoundFilter/SoundFilter.csproj b/SoundFilter/SoundFilter.csproj index 8e11d95..b8ec21f 100755 --- a/SoundFilter/SoundFilter.csproj +++ b/SoundFilter/SoundFilter.csproj @@ -1,7 +1,7 @@ - net6-windows - 1.4.9 + net7-windows + 1.4.10 latest enable true @@ -62,9 +62,9 @@ - + - + - + \ No newline at end of file diff --git a/SoundFilter/packages.lock.json b/SoundFilter/packages.lock.json old mode 100644 new mode 100755 index 94b862f..9f7c167 --- a/SoundFilter/packages.lock.json +++ b/SoundFilter/packages.lock.json @@ -1,12 +1,12 @@ { "version": 1, "dependencies": { - "net6.0-windows7.0": { + "net7.0-windows7.0": { "DalamudPackager": { "type": "Direct", - "requested": "[2.1.8, )", - "resolved": "2.1.8", - "contentHash": "YqagNXs9InxmqkXzq7kLveImxnodkBEicAhydMXVp7dFjC7xb76U6zGgAax4/BWIWfZeWzr5DJyQSev31kj81A==" + "requested": "[2.1.10, )", + "resolved": "2.1.10", + "contentHash": "S6NrvvOnLgT4GDdgwuKVJjbFo+8ZEj+JsEYk9ojjOR/MMfv1dIFpT8aRJQfI24rtDcw1uF+GnSSMN4WW1yt7fw==" }, "DotNet.Glob": { "type": "Direct", @@ -16,9 +16,9 @@ }, "Fody": { "type": "Direct", - "requested": "[6.6.3, )", - "resolved": "6.6.3", - "contentHash": "X1WKKgSNYVtLzdO8dK3YWmfmljA4L0soePcWNouq9X6WbVF4bmivuJdlhTZx/2L3ml6tMvhFe8skIbVQ24PAYA==" + "requested": "[6.6.4, )", + "resolved": "6.6.4", + "contentHash": "vLZS+oa+ndUHYPlx/8n9bBTT3dHkCF0riml4paKq4D663+cZd47x1uagQo32D/gKFZ/sfmV1oqKaLmH0elxq4A==" }, "Resourcer.Fody": { "type": "Direct", @@ -930,4 +930,4 @@ } } } -} \ No newline at end of file +}