[apiX] first pass update for new clientstructs (#1818)

* first pass update for new clientstructs

* track latest clientstructs & fix compilation errors

* fix GameInventory hook bug
rename Appartment
This commit is contained in:
aers 2024-05-31 09:09:28 -07:00 committed by GitHub
parent 666eab98bd
commit d823db7930
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 126 additions and 93 deletions

View file

@ -1,5 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace Dalamud.Game.ClientState.Statuses;
@ -98,16 +99,16 @@ public sealed unsafe partial class StatusList
}
/// <summary>
/// Gets the address of the party member at the specified index of the party list.
/// Gets the address of the status at the specific index in the status list.
/// </summary>
/// <param name="index">The index of the party member.</param>
/// <returns>The memory address of the party member.</returns>
/// <param name="index">The index of the status.</param>
/// <returns>The memory address of the status.</returns>
public IntPtr GetStatusAddress(int index)
{
if (index < 0 || index >= this.Length)
return IntPtr.Zero;
return (IntPtr)(this.Struct->Status + (index * StatusSize));
return (IntPtr)Unsafe.AsPointer(ref this.Struct->Status[index]);
}
}