From 7fa1a9b5f08e16e0d2f9ddee4d5b13386c826f9c Mon Sep 17 00:00:00 2001 From: shakdar Date: Sat, 11 Feb 2023 18:54:33 -0700 Subject: [PATCH] complete prototype for PartyFinderPayload --- .../Payloads/PartyFinderPayload.cs | 6 ++++++ .../Game/Text/SeStringHandling/SeStringBuilder.cs | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/Dalamud/Game/Text/SeStringHandling/Payloads/PartyFinderPayload.cs b/Dalamud/Game/Text/SeStringHandling/Payloads/PartyFinderPayload.cs index 8a9124504..0931ab03f 100644 --- a/Dalamud/Game/Text/SeStringHandling/Payloads/PartyFinderPayload.cs +++ b/Dalamud/Game/Text/SeStringHandling/Payloads/PartyFinderPayload.cs @@ -75,6 +75,12 @@ namespace Dalamud.Game.Text.SeStringHandling.Payloads /// public override PayloadType Type => PayloadType.PartyFinder; + /// + public override string ToString() + { + return $"{this.Type} - ListingId: {this.ListingId}, PartyFinderLinkType: {this.LinkType}"; + } + /// protected override void DecodeImpl(BinaryReader reader, long endOfStream) { diff --git a/Dalamud/Game/Text/SeStringHandling/SeStringBuilder.cs b/Dalamud/Game/Text/SeStringHandling/SeStringBuilder.cs index b32741005..36bb10a2d 100644 --- a/Dalamud/Game/Text/SeStringHandling/SeStringBuilder.cs +++ b/Dalamud/Game/Text/SeStringHandling/SeStringBuilder.cs @@ -186,6 +186,20 @@ public class SeStringBuilder /// The current builder. public SeStringBuilder AddStatusLink(uint statusId) => this.Add(new StatusPayload(statusId)); + /// + /// Add a link to the party finder search conditions to the builder. + /// + /// The current builder. + public SeStringBuilder AddPartyFinderSearchConditionsLink() => this.Add(new PartyFinderPayload()); + + /// + /// Add a party finder listing link to the builder. + /// + /// The listing ID of the party finder listing. + /// Whether the listing is limited to the recruiting world. + /// The current builder. + public SeStringBuilder AddPartyFinderLink(uint id, bool isCrossWorld = false) => this.Add(new PartyFinderPayload(id, isCrossWorld ? PartyFinderPayload.PartyFinderLinkType.NotSpecified : PartyFinderPayload.PartyFinderLinkType.LimitedToHomeWorld)); + /// /// Add a payload to the builder. ///