Show / Hide Table of Contents

# Class ItemPayload

An SeString Payload representing an interactable item link.

##### Inheritance

System.Object
Payload
ItemPayload

##### Inherited Members

Payload.DataResolver
Payload.Dirty
Payload.Decode(BinaryReader)
Payload.Encode(Boolean)
Payload.START_BYTE
Payload.END_BYTE
Payload.GetInteger(BinaryReader)
Payload.MakeInteger(UInt32)
Payload.GetPackedIntegers(BinaryReader)
Payload.MakePackedInteger(UInt32, UInt32)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)

###### Namespace: Dalamud.Game.Text.SeStringHandling.Payloads

###### Assembly: Dalamud.dll

##### Syntax

    public class ItemPayload : Payload

### Constructors

| Improve this Doc View Source

#### ItemPayload(UInt32, Boolean, String)

Initializes a new instance of the ItemPayload class. Creates a payload representing an interactable item link for the specified item.

##### Declaration

    public ItemPayload(uint itemId, bool isHq, string displayNameOverride = null)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt32 | itemId | The id of the item.
System.Boolean | isHq | Whether or not the link should be for the high-quality variant 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.

### Properties

| Improve this Doc View Source

#### 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.

##### Declaration

    public string DisplayName { get; set; }

##### Property Value

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### IsHQ

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

##### Declaration

    [JsonProperty]
    public bool IsHQ { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### Item

Gets the underlying Lumina Item represented by this payload.

##### Declaration

    [JsonIgnore]
    public Item Item { get; }

##### Property Value

Type | Description
--- | ---
Lumina.Excel.GeneratedSheets.Item |

##### Remarks

The value is evaluated lazily and cached.

| Improve this Doc View Source

#### ItemId

Gets the raw item ID of this payload.

##### Declaration

    [JsonIgnore]
    public uint ItemId { get; }

##### Property Value

Type | Description
--- | ---
System.UInt32 |

| Improve this Doc View Source

#### Type

Gets the type of this payload.

##### Declaration

    public override PayloadType Type { get; }

##### Property Value

Type | Description
--- | ---
PayloadType |

##### Overrides

Payload.Type

### Methods

| Improve this Doc View Source

#### DecodeImpl(BinaryReader, Int64)

Decodes a byte stream from the game into a payload object.

##### Declaration

    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.

##### Overrides

Payload.DecodeImpl(BinaryReader, Int64)
| Improve this Doc View Source

#### EncodeImpl()

Encodes the internal state of this payload into a byte[] suitable for sending to in-game handlers such as the chat log.

##### Declaration

    protected override byte[] EncodeImpl()

##### Returns

Type | Description
--- | ---
System.Byte[] | Encoded binary payload data suitable for use with in-game handlers.

##### Overrides

Payload.EncodeImpl()
| Improve this Doc View Source

#### ToString()

##### Declaration

    public override string ToString()

##### Returns

Type | Description
--- | ---
System.String |

##### Overrides

System.Object.ToString()