Updated hooks
This commit is contained in:
@@ -82,7 +82,7 @@ internal static class Constants
|
||||
/// <summary>
|
||||
/// Movement hook address, used for position offset and other changes which cannot be done in main hook
|
||||
/// </summary>
|
||||
public const string MovementHookAddress = "E8 ?? ?? ?? ?? EB 29 48 8B 5F 08";
|
||||
public const string MovementHookAddress = "E8 ?? ?? ?? ?? 84 DB 74 45";
|
||||
|
||||
internal static class Colors
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ public class HookingService : IDisposable
|
||||
private Hook<RenderDelegate>? _renderManagerHook;
|
||||
private Hook<GameObjectMovementDelegate>? _gameObjectMovementHook;
|
||||
|
||||
private delegate nint RenderDelegate(nint a1, nint a2, int a3, int a4);
|
||||
private delegate nint RenderDelegate(nint a1, nint a2, nint a3, int a4);
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
|
||||
private delegate void GameObjectMovementDelegate(nint gameObject);
|
||||
@@ -55,7 +55,6 @@ public class HookingService : IDisposable
|
||||
ReloadHooks();
|
||||
}
|
||||
|
||||
[Obsolete("To be updated for Dawntrail")]
|
||||
public void ReloadHooks()
|
||||
{
|
||||
RenderHookFailed = false;
|
||||
@@ -65,7 +64,7 @@ public class HookingService : IDisposable
|
||||
{
|
||||
if (_configuration.PluginEnabled)
|
||||
{
|
||||
/*if (_renderManagerHook == null)
|
||||
if (_renderManagerHook == null)
|
||||
{
|
||||
var renderAddress = _sigScanner.ScanText(Constants.RenderHookAddress);
|
||||
_renderManagerHook = _hooker.HookFromAddress<RenderDelegate>(renderAddress, OnRender);
|
||||
@@ -84,7 +83,7 @@ public class HookingService : IDisposable
|
||||
_renderManagerHook.Enable();
|
||||
|
||||
_logger.Debug("Hooking movement functions");
|
||||
_gameObjectMovementHook.Enable();*/
|
||||
_gameObjectMovementHook.Enable();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -102,7 +101,7 @@ public class HookingService : IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
private nint OnRender(nint a1, nint a2, int a3, int a4)
|
||||
private nint OnRender(nint a1, nint a2, nint a3, int a4)
|
||||
{
|
||||
if (_renderManagerHook == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user