From 84b2ca06839a69a9233b5aa9afff6ff2229634fc Mon Sep 17 00:00:00 2001 From: Anna Clemens Date: Fri, 4 Feb 2022 05:06:55 -0500 Subject: [PATCH] feat: add local send tell option --- ChatTwo/PayloadHandler.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ChatTwo/PayloadHandler.cs b/ChatTwo/PayloadHandler.cs index 0d99b71..6880274 100755 --- a/ChatTwo/PayloadHandler.cs +++ b/ChatTwo/PayloadHandler.cs @@ -379,12 +379,17 @@ internal sealed class PayloadHandler { this.Log.DrawChunks(name, false); ImGui.Separator(); - if (player.World.IsPublic) { - if (ImGui.Selectable("Send Tell")) { - this.Log.Chat = $"/tell {player.PlayerName}@{player.World.Name} "; - this.Log.Activate = true; + if (ImGui.Selectable("Send Tell")) { + this.Log.Chat = $"/tell {player.PlayerName}"; + if (player.World.IsPublic) { + this.Log.Chat += $"@{player.World.Name}"; } + this.Log.Chat += " "; + this.Log.Activate = true; + } + + if (player.World.IsPublic) { var party = this.Ui.Plugin.PartyList; var leader = (ulong?) party[(int) party.PartyLeaderIndex]?.ContentId; var isLeader = party.Length == 0 || this.Ui.Plugin.ClientState.LocalContentId == leader;