Don't throw in HookVerifier if user does not have devPlugins, until api15

This commit is contained in:
goaaats 2026-02-15 17:42:21 +01:00
parent dbe61a426e
commit 9c73cbe596

View file

@ -3,6 +3,7 @@ using System.Reflection;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Dalamud.Configuration.Internal;
using Dalamud.Game; using Dalamud.Game;
using Dalamud.Logging.Internal; using Dalamud.Logging.Internal;
@ -65,6 +66,13 @@ internal static class HookVerifier
/// <exception cref="HookVerificationException">Exception thrown when we think the hook is not correctly declared.</exception> /// <exception cref="HookVerificationException">Exception thrown when we think the hook is not correctly declared.</exception>
public static void Verify<T>(IntPtr address) where T : Delegate public static void Verify<T>(IntPtr address) where T : Delegate
{ {
// API15 TODO: Always throw
var config = Service<DalamudConfiguration>.GetNullable();
if (config != null && config.DevPluginLoadLocations.Count == 0)
{
return;
}
var entry = ToVerify.FirstOrDefault(x => x.Address == address); var entry = ToVerify.FirstOrDefault(x => x.Address == address);
// Nothing to verify for this hook? // Nothing to verify for this hook?