Skip to main content
Version: 15.x (API 15) [Current]

Class ItemUtil

Utilities related to Items.

Assembly: Dalamud.dll​
Declaration
public static class ItemUtil

Methods​

GetBaseId(uint)​

Converts raw item ID to item ID with its classification.

Declaration
public static (uint ItemId, ItemKind Kind) GetBaseId(uint rawItemId)
Returns​

System.ValueTuple<System.UInt32,Dalamud.Utility.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.

Declaration
public static uint GetRawId(uint itemId, ItemKind kind)
Returns​

System.UInt32: Raw Item ID.

Parameters​
TypeNameDescription
System.UInt32itemIdItem ID.
Dalamud.Utility.ItemKindkindItem classification.

IsNormalItem(uint)​

Checks if the item id belongs to a normal item.

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.

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.

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.

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.

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.

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.