From fc9c94299f7544004a796383ffea39969ce5f2d2 Mon Sep 17 00:00:00 2001 From: goaaats Date: Sun, 8 Jan 2023 00:04:33 +0100 Subject: [PATCH] fix: only fire Login event when PC GO is available --- Dalamud/Game/ClientState/ClientState.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dalamud/Game/ClientState/ClientState.cs b/Dalamud/Game/ClientState/ClientState.cs index 491d2aeae..cacb42c0a 100644 --- a/Dalamud/Game/ClientState/ClientState.cs +++ b/Dalamud/Game/ClientState/ClientState.cs @@ -63,7 +63,7 @@ public sealed class ClientState : IDisposable, IServiceType public event EventHandler TerritoryChanged; /// - /// Event that fires when a character is logging in. + /// Event that fires when a character is logging in, and the local character object is available. /// public event EventHandler Login; @@ -167,7 +167,7 @@ public sealed class ClientState : IDisposable, IServiceType if (condition == null || gameGui == null || data == null) return; - if (condition.Any() && this.lastConditionNone == true) + if (condition.Any() && this.lastConditionNone == true && this.LocalPlayer != null) { Log.Debug("Is login"); this.lastConditionNone = false;