mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
StatusList.Length is misleading
This commit is contained in:
parent
5c490dee32
commit
d00a9827d7
1 changed files with 2 additions and 16 deletions
|
|
@ -36,23 +36,9 @@ namespace Dalamud.Game.ClientState.Statuses
|
|||
public IntPtr Address { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the amount of status effects the actor has.
|
||||
/// Gets the amount of status effect slots the actor has.
|
||||
/// </summary>
|
||||
public int Length
|
||||
{
|
||||
get
|
||||
{
|
||||
var i = 0;
|
||||
for (; i < StatusListLength; i++)
|
||||
{
|
||||
var status = this[i];
|
||||
if (status == null || status.StatusId == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
}
|
||||
public int Length => StatusListLength;
|
||||
|
||||
private static int StatusSize { get; } = Marshal.SizeOf<FFXIVClientStructs.FFXIV.Client.Game.Status>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue