Skip to main content

Class ItemUtil

Utilities related to Items.

Assembly: Dalamud.dll
View Source
Declaration
public static class ItemUtil

Methods

GetBaseId(uint)

Converts raw item ID to item ID with its classification.

View Source
Declaration
public static (uint ItemId, ItemPayload.ItemKind Kind) GetBaseId(uint rawItemId)
Returns

System.ValueTuple<System.UInt32,Dalamud.Game.Text.SeStringHandling.Payloads.ItemPayload.ItemKind>: Item ID and its classification.

Parameters
TypeNameDescription
System.UInt32rawItemIdRaw item ID.

GetRawId(uint, ItemKind)

Converts item ID with its classification to raw item ID.

View Source
Declaration
public static uint GetRawId(uint itemId, ItemPayload.ItemKind kind)
Returns

System.UInt32: Raw Item ID.

Parameters
TypeNameDescription
System.UInt32itemIdItem ID.
Dalamud.Game.Text.SeStringHandling.Payloads.ItemPayload.ItemKindkindItem classification.

IsNormalItem(uint)

Checks if the item id belongs to a normal item.

View Source
Declaration
public static bool IsNormalItem(uint itemId)
Returns

System.Boolean: true when the item id belongs to a normal item.

Parameters
TypeNameDescription
System.UInt32itemIdThe item id to check.

IsCollectible(uint)

Checks if the item id belongs to a collectible item.

View Source
Declaration
public static bool IsCollectible(uint itemId)
Returns

System.Boolean: true when the item id belongs to a collectible item.

Parameters
TypeNameDescription
System.UInt32itemIdThe item id to check.

IsHighQuality(uint)

Checks if the item id belongs to a high quality item.

View Source
Declaration
public static bool IsHighQuality(uint itemId)
Returns

System.Boolean: true when the item id belongs to a high quality item.

Parameters
TypeNameDescription
System.UInt32itemIdThe item id to check.

IsEventItem(uint)

Checks if the item id belongs to an event item.

View Source
Declaration
public static bool IsEventItem(uint itemId)
Returns

System.Boolean: true when the item id belongs to an event item.

Parameters
TypeNameDescription
System.UInt32itemIdThe item id to check.

GetItemName(uint, bool, ClientLanguage?)

Gets the name of an item.

View Source
Declaration
public static ReadOnlySeString GetItemName(uint itemId, bool includeIcon = true, ClientLanguage? language = null)
Returns

Lumina.Text.ReadOnly.ReadOnlySeString: The item name.

Parameters
TypeNameDescription
System.UInt32itemIdThe raw item id.
System.BooleanincludeIconWhether to include the High Quality or Collectible icon.
System.Nullable<Dalamud.Game.ClientLanguage>languageAn optional client language override.

GetItemRarityColorType(uint, bool)

Gets the color row id for an item name.

View Source
Declaration
public static uint GetItemRarityColorType(uint itemId, bool isEdgeColor = false)
Returns

System.UInt32: The Color row id.

Parameters
TypeNameDescription
System.UInt32itemIdThe raw item Id.
System.BooleanisEdgeColorWheather this color is used as edge color.