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> /// <summary>
/// Movement hook address, used for position offset and other changes which cannot be done in main hook /// Movement hook address, used for position offset and other changes which cannot be done in main hook
/// </summary> /// </summary>
public const string MovementHookAddress = "E8 ?? ?? ?? ?? 84 DB 74 45"; public const string MovementHookAddress = "E8 ?? ?? ?? ?? 84 DB 74 3A";
internal static class Colors internal static class Colors
{ {

View File

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

View File

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