Skip to main content

Class ItemPayload

An SeString Payload representing an interactable item link.

Assembly: Dalamud.dll
View Source
Declaration
public class ItemPayload : Payload

Inheritance: System.Object -> Dalamud.Game.Text.SeStringHandling.Payload

Properties

Type

Gets the type of this payload.

View Source
Declaration
public override PayloadType Type { get; }

DisplayName

Gets or sets the displayed name for this item link. Note that incoming links only sometimes have names embedded, often the name is only present in a following text payload.

View Source
Declaration
public string? DisplayName { get; set; }

ItemId

Gets the actual item ID of this payload.

View Source
Declaration
[JsonIgnore]
public uint ItemId { get; }

RawItemId

Gets the raw, unadjusted item ID of this payload.

View Source
Declaration
[JsonIgnore]
public uint RawItemId { get; }

Item

Gets the underlying Lumina Item represented by this payload.

View Source
Declaration
[JsonIgnore]
public Item? Item { get; }

IsHQ

Gets a value indicating whether or not this item link is for a high-quality version of the item.

View Source
Declaration
[JsonProperty]
public bool IsHQ { get; }

Kind

Gets or sets the kind of item represented by this payload.

View Source
Declaration
[JsonProperty]
public ItemPayload.ItemKind Kind { get; set; }

Methods

FromRaw(uint, string?)

Initializes a new instance of the Dalamud.Game.Text.SeStringHandling.Payloads.ItemPayload class. Creates a payload representing an interactable item link for the specified item.

View Source
Declaration
public static ItemPayload FromRaw(uint rawItemId, string? displayNameOverride = null)
Returns

Dalamud.Game.Text.SeStringHandling.Payloads.ItemPayload: The created item payload.

Parameters
TypeNameDescription
System.UInt32rawItemIdThe raw, unadjusted id of the item.
System.StringdisplayNameOverrideAn optional name to include in the item link. Typically this should
be left as null, or set to the normal item name.  Actual overrides are better done with the subsequent
TextPayload that is a part of a full item link in chat. |

ToString()

Returns a string that represents the current object.

View Source
Declaration
public override string ToString()
Returns

System.String: A string that represents the current object.### EncodeImpl() Encodes the internal state of this payload into a byte[] suitable for sending to in-game handlers such as the chat log.

View Source
Declaration
protected override byte[] EncodeImpl()
Returns

System.Byte[]: Encoded binary payload data suitable for use with in-game handlers.### DecodeImpl(BinaryReader, long) Decodes a byte stream from the game into a payload object.

View Source
Declaration
protected override void DecodeImpl(BinaryReader reader, long endOfStream)
Parameters
TypeNameDescription
System.IO.BinaryReaderreaderA BinaryReader containing at least all the data for this payload.
System.Int64endOfStreamThe location holding the end of the data for this payload.