fix inverted hook logic.

This commit is contained in:
Ottermandias 2024-11-26 17:04:38 +01:00
parent b1be868a6a
commit 10279fdc18
2 changed files with 3 additions and 4 deletions

View file

@ -1,4 +1,3 @@
using Dalamud.Hooking;
using FFXIVClientStructs.FFXIV.Client.Game.Character;
using OtterGui.Services;
using Penumbra.GameData;
@ -19,7 +18,7 @@ public unsafe class AtchCallerHook1 : FastHook<AtchCallerHook1.Delegate>, IDispo
_metaState = metaState;
_collectionResolver = collectionResolver;
Task = hooks.CreateHook<Delegate>("AtchCaller1", Sigs.AtchCaller1, Detour,
metaState.Config.EnableMods && HookOverrides.Instance.Meta.AtchCaller1);
metaState.Config.EnableMods && !HookOverrides.Instance.Meta.AtchCaller1);
if (!HookOverrides.Instance.Meta.AtchCaller1)
_metaState.Config.ModsEnabled += Toggle;
}
@ -30,7 +29,7 @@ public unsafe class AtchCallerHook1 : FastHook<AtchCallerHook1.Delegate>, IDispo
_metaState.AtchCollection.Push(collection);
Task.Result.Original(data, slot, unk, playerModel);
_metaState.AtchCollection.Pop();
Penumbra.Log.Excessive(
Penumbra.Log.Information(
$"[AtchCaller1] Invoked on 0x{(ulong)data:X} with {slot}, {unk:X}, 0x{playerModel.Address:X}, identified to {collection.ModCollection.AnonymizedName}.");
}

View file

@ -18,7 +18,7 @@ public unsafe class AtchCallerHook2 : FastHook<AtchCallerHook2.Delegate>, IDispo
_metaState = metaState;
_collectionResolver = collectionResolver;
Task = hooks.CreateHook<Delegate>("AtchCaller2", Sigs.AtchCaller2, Detour,
metaState.Config.EnableMods && HookOverrides.Instance.Meta.AtchCaller2);
metaState.Config.EnableMods && !HookOverrides.Instance.Meta.AtchCaller2);
if (!HookOverrides.Instance.Meta.AtchCaller2)
_metaState.Config.ModsEnabled += Toggle;
}