mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 21:24:16 +01:00
cleanup: remove obsolete Hook ctors
This commit is contained in:
parent
ddf4e56ee6
commit
276ad3733f
1 changed files with 0 additions and 39 deletions
|
|
@ -26,32 +26,6 @@ public class Hook<T> : IDisposable, IDalamudHook where T : Delegate
|
|||
|
||||
private readonly Hook<T>? compatHookImpl;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Hook{T}"/> class.
|
||||
/// Hook is not activated until Enable() method is called.
|
||||
/// </summary>
|
||||
/// <param name="address">A memory address to install a hook.</param>
|
||||
/// <param name="detour">Callback function. Delegate must have a same original function prototype.</param>
|
||||
[Obsolete("Use Hook<T>.FromAddress instead.")]
|
||||
public Hook(IntPtr address, T detour)
|
||||
: this(address, detour, false, Assembly.GetCallingAssembly())
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Hook{T}"/> class.
|
||||
/// Hook is not activated until Enable() method is called.
|
||||
/// Please do not use MinHook unless you have thoroughly troubleshot why Reloaded does not work.
|
||||
/// </summary>
|
||||
/// <param name="address">A memory address to install a hook.</param>
|
||||
/// <param name="detour">Callback function. Delegate must have a same original function prototype.</param>
|
||||
/// <param name="useMinHook">Use the MinHook hooking library instead of Reloaded.</param>
|
||||
[Obsolete("Use Hook<T>.FromAddress instead.")]
|
||||
public Hook(IntPtr address, T detour, bool useMinHook)
|
||||
: this(address, detour, useMinHook, Assembly.GetCallingAssembly())
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Hook{T}"/> class.
|
||||
/// </summary>
|
||||
|
|
@ -61,19 +35,6 @@ public class Hook<T> : IDisposable, IDalamudHook where T : Delegate
|
|||
this.address = address;
|
||||
}
|
||||
|
||||
[Obsolete("Use Hook<T>.FromAddress instead.")]
|
||||
private Hook(IntPtr address, T detour, bool useMinHook, Assembly callingAssembly)
|
||||
{
|
||||
if (EnvironmentConfiguration.DalamudForceMinHook)
|
||||
useMinHook = true;
|
||||
|
||||
this.address = address = HookManager.FollowJmp(address);
|
||||
if (useMinHook)
|
||||
this.compatHookImpl = new MinHookHook<T>(address, detour, callingAssembly);
|
||||
else
|
||||
this.compatHookImpl = new ReloadedHook<T>(address, detour, callingAssembly);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a memory address of the target function.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue