diff --git a/ChatTwo/GameFunctions/GameFunctions.cs b/ChatTwo/GameFunctions/GameFunctions.cs index 8b8e387..2a6915d 100755 --- a/ChatTwo/GameFunctions/GameFunctions.cs +++ b/ChatTwo/GameFunctions/GameFunctions.cs @@ -83,6 +83,14 @@ internal unsafe class GameFunctions : IDisposable { } internal void SendFriendRequest(string name, ushort world) { + this.ListCommand(name, world, "friendlist"); + } + + internal void AddToBlacklist(string name, ushort world) { + this.ListCommand(name, world, "blist"); + } + + private void ListCommand(string name, ushort world, string commandName) { var row = this.Plugin.DataManager.GetExcelSheet()!.GetRow(world); if (row == null) { return; @@ -90,7 +98,7 @@ internal unsafe class GameFunctions : IDisposable { var worldName = row.Name.RawString; this._replacementName = $"{name}@{worldName}"; - this.Plugin.Common.Functions.Chat.SendMessage($"/friendlist add {this._placeholder}"); + this.Plugin.Common.Functions.Chat.SendMessage($"/{commandName} add {this._placeholder}"); } internal static void SetAddonInteractable(string name, bool interactable) { diff --git a/ChatTwo/PayloadHandler.cs b/ChatTwo/PayloadHandler.cs index b5fb503..05274ae 100755 --- a/ChatTwo/PayloadHandler.cs +++ b/ChatTwo/PayloadHandler.cs @@ -309,6 +309,10 @@ internal sealed class PayloadHandler { this.Ui.Plugin.Functions.SendFriendRequest(player.PlayerName, (ushort) player.World.RowId); } + if (ImGui.Selectable("Add to Blacklist")) { + this.Ui.Plugin.Functions.AddToBlacklist(player.PlayerName, (ushort) player.World.RowId); + } + if (this.Ui.Plugin.Functions.IsMentor() && ImGui.Selectable("Invite to Novice Network")) { this.Ui.Plugin.Functions.Context.InviteToNoviceNetwork(player.PlayerName, (ushort) player.World.RowId); } @@ -328,7 +332,6 @@ internal sealed class PayloadHandler { ImGui.Checkbox("Screenshot mode", ref this.Ui.ScreenshotMode); - // Add to Blacklist 0x1C // View Party Finder 0x2E }