mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: activate reloaded hook immediately after instantiation
This commit is contained in:
parent
d21c0f1947
commit
3de56c992f
1 changed files with 1 additions and 3 deletions
|
|
@ -29,6 +29,7 @@ namespace Dalamud.Hooking.Internal
|
||||||
}
|
}
|
||||||
|
|
||||||
this.hookImpl = ReloadedHooks.Instance.CreateHook<T>(detour, address.ToInt64());
|
this.hookImpl = ReloadedHooks.Instance.CreateHook<T>(detour, address.ToInt64());
|
||||||
|
this.hookImpl.Activate();
|
||||||
|
|
||||||
HookManager.TrackedHooks.TryAdd(Guid.NewGuid(), new HookInfo(this, detour, callingAssembly));
|
HookManager.TrackedHooks.TryAdd(Guid.NewGuid(), new HookInfo(this, detour, callingAssembly));
|
||||||
}
|
}
|
||||||
|
|
@ -75,9 +76,6 @@ namespace Dalamud.Hooking.Internal
|
||||||
|
|
||||||
lock (HookManager.HookEnableSyncRoot)
|
lock (HookManager.HookEnableSyncRoot)
|
||||||
{
|
{
|
||||||
if (!this.hookImpl.IsHookActivated)
|
|
||||||
this.hookImpl.Activate();
|
|
||||||
|
|
||||||
if (!this.hookImpl.IsHookEnabled)
|
if (!this.hookImpl.IsHookEnabled)
|
||||||
this.hookImpl.Enable();
|
this.hookImpl.Enable();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue