diff --git a/.editorconfig b/.editorconfig index fab28f133..a8a710254 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,3 +10,9 @@ insert_final_newline = true # 4 space indentation indent_style = space indent_size = 4 + +# disable redundant style warnings +dotnet_style_qualification_for_field = false:silent +dotnet_style_qualification_for_property = false:silent +dotnet_style_qualification_for_method = false:silent +dotnet_style_qualification_for_event = false:silent \ No newline at end of file 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); } }