Class ItemPayload
An SeString Payload representing an interactable item link.
Assembly: Dalamud.dll
View Source
public class ItemPayload : Payload
Inheritance: System.Object
-> Dalamud.Game.Text.SeStringHandling.Payload
Properties
Type
Gets the type of this payload.
View Source
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
public string? DisplayName { get; set; }
ItemId
Gets the actual item ID of this payload.
View Source
[JsonIgnore]
public uint ItemId { get; }
RawItemId
Gets the raw, unadjusted item ID of this payload.
View Source
[JsonIgnore]
public uint RawItemId { get; }
Item
Gets the underlying Lumina data represented by this payload. This is either a Item or EventItem Lumina.Excel.RowRef%601
.
View Source
[JsonIgnore]
public RowRef Item { get; }
IsHQ
Gets a value indicating whether or not this item link is for a high-quality version of the item.
View Source
[JsonProperty]
public bool IsHQ { get; }
Kind
Gets or sets the kind of item represented by this payload.
View Source
[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
public static ItemPayload FromRaw(uint rawItemId, string? displayNameOverride = null)
Returns
Dalamud.Game.Text.SeStringHandling.Payloads.ItemPayload: The created item payload.
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | rawItemId | The raw, unadjusted id of the item. |
System.String | displayNameOverride | An 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
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
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
protected override void DecodeImpl(BinaryReader reader, long endOfStream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.BinaryReader | reader | A BinaryReader containing at least all the data for this payload. |
System.Int64 | endOfStream | The location holding the end of the data for this payload. |