From 5c3bcf94ce80e9d4dfcf1723a8a09512e429d92e Mon Sep 17 00:00:00 2001 From: kalilistic <35899782+kalilistic@users.noreply.github.com> Date: Sat, 3 Apr 2021 11:27:31 -0400 Subject: [PATCH 1/2] disable redundant this warning for solution style --- .editorconfig | 6 ++++++ 1 file changed, 6 insertions(+) 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 From 7368ace8b4240b1c90304a34134599b91a024d1c Mon Sep 17 00:00:00 2001 From: kalilistic <35899782+kalilistic@users.noreply.github.com> Date: Sat, 3 Apr 2021 12:11:22 -0400 Subject: [PATCH 2/2] add IsLoggedIn property --- Dalamud/Game/ClientState/ClientState.cs | 7 +++++++ 1 file changed, 7 insertions(+) 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); } }