From 5212d271bcd883d1ed5a496460e8e35dd082c77c Mon Sep 17 00:00:00 2001 From: Anna Date: Sun, 10 Jul 2022 13:30:51 -0400 Subject: [PATCH] fix: check for missing content id correctly --- ChatTwo/PayloadHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChatTwo/PayloadHandler.cs b/ChatTwo/PayloadHandler.cs index bc4f3b0..234f48a 100755 --- a/ChatTwo/PayloadHandler.cs +++ b/ChatTwo/PayloadHandler.cs @@ -464,7 +464,7 @@ internal sealed class PayloadHandler { if (isLeader) { if (!isInParty) { if (inInstance && inPartyInstance) { - if (chunk.Message?.ContentId is not null or 0 && ImGui.Selectable(Language.Context_InviteToParty)) { + if (chunk.Message?.ContentId is not (null or 0) && ImGui.Selectable(Language.Context_InviteToParty)) { this.Ui.Plugin.Functions.Party.InviteInInstance(chunk.Message!.ContentId); } } else if (!inInstance && ImGui.BeginMenu(Language.Context_InviteToParty)) { @@ -472,7 +472,7 @@ internal sealed class PayloadHandler { this.Ui.Plugin.Functions.Party.InviteSameWorld(player.PlayerName, (ushort) world.RowId, chunk.Message?.ContentId ?? 0); } - if (chunk.Message?.ContentId is not null or 0 && ImGui.Selectable(Language.Context_InviteToParty_DifferentWorld)) { + if (chunk.Message?.ContentId is not (null or 0) && ImGui.Selectable(Language.Context_InviteToParty_DifferentWorld)) { this.Ui.Plugin.Functions.Party.InviteOtherWorld(chunk.Message!.ContentId); }