From 50c812f5516d4e10932848e1e0dade34a0c95220 Mon Sep 17 00:00:00 2001
From: goat <16760685+goaaats@users.noreply.github.com>
Date: Sat, 9 Jul 2022 03:14:29 +0200
Subject: [PATCH] fix: use correct indexer for ClientState.LocalPlayer
---
Dalamud/Game/ClientState/ClientState.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Dalamud/Game/ClientState/ClientState.cs b/Dalamud/Game/ClientState/ClientState.cs
index bc2939f8b..940973ad8 100644
--- a/Dalamud/Game/ClientState/ClientState.cs
+++ b/Dalamud/Game/ClientState/ClientState.cs
@@ -1,5 +1,4 @@
using System;
-using System.Linq;
using System.Runtime.InteropServices;
using Dalamud.Data;
@@ -105,7 +104,7 @@ namespace Dalamud.Game.ClientState
///
/// Gets the local player character, if one is present.
///
- public PlayerCharacter? LocalPlayer => Service.GetNullable()?.FirstOrDefault() as PlayerCharacter;
+ public PlayerCharacter? LocalPlayer => Service.GetNullable()?[0] as PlayerCharacter;
///
/// Gets the content ID of the local character.