Put kind check on the correct function

This commit is contained in:
MidoriKami 2025-07-26 17:34:07 -07:00
parent fe3faa3738
commit 28ad006fe5

View file

@ -168,7 +168,7 @@ internal sealed partial class ObjectTable : IServiceType, IObjectTable
{
for (var index = 0; index < 200; index += 2)
{
if (this[index] is IBattleChara gameObject)
if (this[index] is IBattleChara { ObjectKind: ObjectKind.Player } gameObject)
{
yield return gameObject;
}
@ -179,7 +179,7 @@ internal sealed partial class ObjectTable : IServiceType, IObjectTable
{
for (var index = range.Start.Value; index <= range.End.Value; index++)
{
if (this[index] is { ObjectKind: ObjectKind.Player } gameObject)
if (this[index] is { } gameObject)
{
yield return gameObject;
}