From d00a9827d7ab02dbdcf80de879c705ba0bd1dd39 Mon Sep 17 00:00:00 2001 From: Raymond Date: Sun, 26 Sep 2021 17:23:27 -0400 Subject: [PATCH] StatusList.Length is misleading --- .../Game/ClientState/Statuses/StatusList.cs | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/Dalamud/Game/ClientState/Statuses/StatusList.cs b/Dalamud/Game/ClientState/Statuses/StatusList.cs index dedca8ad7..ee4285dd3 100644 --- a/Dalamud/Game/ClientState/Statuses/StatusList.cs +++ b/Dalamud/Game/ClientState/Statuses/StatusList.cs @@ -36,23 +36,9 @@ namespace Dalamud.Game.ClientState.Statuses public IntPtr Address { get; } /// - /// Gets the amount of status effects the actor has. + /// Gets the amount of status effect slots the actor has. /// - 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();