fix: use correct indexer for ClientState.LocalPlayer

This commit is contained in:
goat 2022-07-09 03:14:29 +02:00
parent ce8e088044
commit 50c812f551
No known key found for this signature in database
GPG key ID: 7773BB5B43BA52E5

View file

@ -1,5 +1,4 @@
using System; using System;
using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Dalamud.Data; using Dalamud.Data;
@ -105,7 +104,7 @@ namespace Dalamud.Game.ClientState
/// <summary> /// <summary>
/// Gets the local player character, if one is present. /// Gets the local player character, if one is present.
/// </summary> /// </summary>
public PlayerCharacter? LocalPlayer => Service<ObjectTable>.GetNullable()?.FirstOrDefault() as PlayerCharacter; public PlayerCharacter? LocalPlayer => Service<ObjectTable>.GetNullable()?[0] as PlayerCharacter;
/// <summary> /// <summary>
/// Gets the content ID of the local character. /// Gets the content ID of the local character.