[api11] Use Conditions address from CS (#2064)

This commit is contained in:
Haselnussbomber 2024-11-05 22:37:45 +01:00 committed by GitHub
parent 30d56e4d11
commit d4735980c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 10 deletions

View file

@ -50,11 +50,6 @@ internal sealed class ClientStateAddressResolver : BaseAddressResolver
/// </summary>
public IntPtr KeyboardStateIndexArray { get; private set; }
/// <summary>
/// Gets the address of the condition flag array.
/// </summary>
public IntPtr ConditionFlags { get; private set; }
// Functions
/// <summary>
@ -93,8 +88,6 @@ internal sealed class ClientStateAddressResolver : BaseAddressResolver
this.KeyboardState = sig.ScanText("48 8D 0C 85 ?? ?? ?? ?? 8B 04 31 85 C2 0F 85") + 0x4;
this.KeyboardStateIndexArray = sig.ScanText("0F B6 94 33 ?? ?? ?? ?? 84 D2") + 0x4;
this.ConditionFlags = sig.GetStaticAddressFromSig("48 8D 0D ?? ?? ?? ?? 8B D3 E8 ?? ?? ?? ?? 32 C0 48 83 C4 20");
this.GamepadPoll = sig.ScanText("40 55 53 57 41 54 41 57 48 8D AC 24 ?? ?? ?? ?? 48 81 EC ?? ?? ?? ?? 44 0F 29 B4 24");
}
}

View file

@ -28,10 +28,9 @@ internal sealed class Condition : IInternalDisposableService, ICondition
private bool isDisposed;
[ServiceManager.ServiceConstructor]
private Condition(ClientState clientState)
private unsafe Condition()
{
var resolver = clientState.AddressResolver;
this.Address = resolver.ConditionFlags;
this.Address = (nint)FFXIVClientStructs.FFXIV.Client.Game.Conditions.Instance();
// Initialization
for (var i = 0; i < MaxConditionEntries; i++)