Class ItemUtil
Utilities related to Items.
Assembly: Dalamud.dll
public static class ItemUtil
Methods
GetBaseId(uint)
Converts raw item ID to item ID with its classification.
public static (uint ItemId, ItemKind Kind) GetBaseId(uint rawItemId)
Returns
System.ValueTuple<System.UInt32,Dalamud.Utility.ItemKind>: Item ID and its classification.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | rawItemId | Raw item ID. |
GetRawId(uint, ItemKind)
Converts item ID with its classification to raw item ID.
public static uint GetRawId(uint itemId, ItemKind kind)
Returns
System.UInt32: Raw Item ID.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | itemId | Item ID. |
| Dalamud.Utility.ItemKind | kind | Item classification. |
IsNormalItem(uint)
Checks if the item id belongs to a normal item.
public static bool IsNormalItem(uint itemId)
Returns
System.Boolean: true when the item id belongs to a normal item.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | itemId | The item id to check. |
IsCollectible(uint)
Checks if the item id belongs to a collectible item.
public static bool IsCollectible(uint itemId)
Returns
System.Boolean: true when the item id belongs to a collectible item.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | itemId | The item id to check. |
IsHighQuality(uint)
Checks if the item id belongs to a high quality item.
public static bool IsHighQuality(uint itemId)
Returns
System.Boolean: true when the item id belongs to a high quality item.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | itemId | The item id to check. |
IsEventItem(uint)
Checks if the item id belongs to an event item.
public static bool IsEventItem(uint itemId)
Returns
System.Boolean: true when the item id belongs to an event item.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | itemId | The item id to check. |
GetItemName(uint, bool, ClientLanguage?)
Gets the name of an item.
public static ReadOnlySeString GetItemName(uint itemId, bool includeIcon = true, ClientLanguage? language = null)
Returns
Lumina.Text.ReadOnly.ReadOnlySeString: The item name.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | itemId | The raw item id. |
System.Boolean | includeIcon | Whether to include the High Quality or Collectible icon. |
System.Nullable<Dalamud.Game.ClientLanguage> | language | An optional client language override. |
GetItemRarityColorType(uint, bool)
Gets the color row id for an item name.
public static uint GetItemRarityColorType(uint itemId, bool isEdgeColor = false)
Returns
System.UInt32: The Color row id.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | itemId | The raw item Id. |
System.Boolean | isEdgeColor | Wheather this color is used as edge color. |