From b0888ba0cb0a8c4d77530fb8440eb13ca6a0157a Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Sun, 24 Dec 2023 00:22:04 +0100 Subject: [PATCH] Include item link in chat output --- Deliveroo/Deliveroo.csproj | 2 +- Deliveroo/DeliverooPlugin.Exchange.cs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Deliveroo/Deliveroo.csproj b/Deliveroo/Deliveroo.csproj index cc1a5e2..d2e2f9d 100644 --- a/Deliveroo/Deliveroo.csproj +++ b/Deliveroo/Deliveroo.csproj @@ -1,7 +1,7 @@ net7.0-windows - 2.21 + 2.22 11.0 enable true diff --git a/Deliveroo/DeliverooPlugin.Exchange.cs b/Deliveroo/DeliverooPlugin.Exchange.cs index 8468e11..3cf8294 100644 --- a/Deliveroo/DeliverooPlugin.Exchange.cs +++ b/Deliveroo/DeliverooPlugin.Exchange.cs @@ -1,5 +1,7 @@ using System; using Dalamud.Game.ClientState.Objects.Types; +using Dalamud.Game.Text.SeStringHandling; +using Dalamud.Game.Text.SeStringHandling.Payloads; using Deliveroo.GameData; using FFXIVClientStructs.FFXIV.Component.GUI; using LLib.GameUI; @@ -144,7 +146,9 @@ partial class DeliverooPlugin return false; } - _chatGui.Print($"Buying {toBuy}x {item.Name}..."); + _chatGui.Print(new SeString(new TextPayload($"Buying {toBuy}x ")) + .Append(SeString.CreateItemLink(item.ItemId)) + .Append(new TextPayload("..."))); var selectReward = stackalloc AtkValue[] { new() { Type = ValueType.Int, Int = 0 },