fix: check for missing content id correctly

This commit is contained in:
Anna 2022-07-10 13:30:51 -04:00
parent 3d58f5b03c
commit 5212d271bc
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}