Fixed signature

This commit is contained in:
2025-08-09 17:24:21 +03:00
parent 20eeafdc41
commit 0a0ae4bee9
3 changed files with 19 additions and 12 deletions

View File

@@ -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 ?? ?? ?? ?? 84 DB 74 45";
public const string MovementHookAddress = "E8 ?? ?? ?? ?? 84 DB 74 3A";
internal static class Colors
{

View File

@@ -2,6 +2,7 @@
using Dalamud.Interface;
using Dalamud.Utility;
using Dalamud.Bindings.ImGui;
using System.Text;
namespace CustomizePlus.Core.Helpers;
@@ -67,14 +68,20 @@ public static class CtrlHelper
public static bool ArrowToggle(string label, ref bool value)
{//ImGuiNative.ArrowButton(label, value ? ImGuiDir.Down : ImGuiDir.Right);
var toggled = false;
if (toggled)
unsafe // temporary fix
{
value = !value;
}
var utf8Label = Encoding.UTF8.GetBytes(label + "\0");
return value;
fixed (byte* labelPtr = utf8Label)
{
bool toggled = ImGuiNative.ArrowButton(labelPtr, value ? ImGuiDir.Down : ImGuiDir.Right) != 0;
if (toggled)
value = !value;
return value;
}
}
}
public static void AddHoverText(string text)

View File

@@ -92,25 +92,25 @@ public class HookingService : IDisposable
_logger.Debug("Render hook established");
}
/*if (_gameObjectMovementHook == null)
if (_gameObjectMovementHook == null)
{
var movementAddress = _sigScanner.ScanText(Constants.MovementHookAddress);
_gameObjectMovementHook = _hooker.HookFromAddress<GameObjectMovementDelegate>(movementAddress, OnGameObjectMove);
_logger.Debug("Movement hook established");
}*/
}
_logger.Debug("Hooking render manager");
_renderManagerHook.Enable();
// _logger.Debug("Hooking movement functions");
// _gameObjectMovementHook.Enable();
_logger.Debug("Hooking movement functions");
_gameObjectMovementHook.Enable();
}
else
{
_logger.Debug("Unhooking...");
_renderManagerHook?.Disable();
// _gameObjectMovementHook?.Disable();
_gameObjectMovementHook?.Disable();
}
}
catch (Exception e)