fix: only fire Login event when PC GO is available

This commit is contained in:
goaaats 2023-01-08 00:04:33 +01:00
parent e3cbc4dc8c
commit fc9c94299f
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B

View file

@ -63,7 +63,7 @@ public sealed class ClientState : IDisposable, IServiceType
public event EventHandler<ushort> TerritoryChanged;
/// <summary>
/// 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.
/// </summary>
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;