diff --git a/Dalamud/Game/ClientState/ClientState.cs b/Dalamud/Game/ClientState/ClientState.cs index 610c2523d..9be2d194c 100644 --- a/Dalamud/Game/ClientState/ClientState.cs +++ b/Dalamud/Game/ClientState/ClientState.cs @@ -175,16 +175,23 @@ namespace Dalamud.Game.ClientState /// public event EventHandler OnLogout; + /// + /// Gets a value indicating whether a character is logged in. + /// + public bool IsLoggedIn { get; private set; } + private void FrameworkOnOnUpdateEvent(Framework framework) { if (this.Condition.Any() && this.lastConditionNone == true) { Log.Debug("Is login"); this.lastConditionNone = false; + this.IsLoggedIn = true; OnLogin?.Invoke(this, null); } if (!this.Condition.Any() && this.lastConditionNone == false) { Log.Debug("Is logout"); this.lastConditionNone = true; + this.IsLoggedIn = false; OnLogout?.Invoke(this, null); } }