Class ItemUtil
Utilities related to Items.
Assembly: Dalamud.dll
View Source
public static class ItemUtil
Methods
GetBaseId(uint)
Converts raw item ID to item ID with its classification.
View Source
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
Type | Name | Description |
---|---|---|
System.UInt32 | rawItemId | Raw item ID. |
GetRawId(uint, ItemKind)
Converts item ID with its classification to raw item ID.
View Source
public static uint GetRawId(uint itemId, ItemPayload.ItemKind kind)
Returns
System.UInt32
: Raw Item ID.
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | itemId | Item ID. |
Dalamud.Game.Text.SeStringHandling.Payloads.ItemPayload.ItemKind | kind | Item classification. |
IsNormalItem(uint)
Checks if the item id belongs to a normal item.
View Source
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.
View Source
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.
View Source
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.
View Source
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.
View Source
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.
View Source
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. |