diff --git a/Dalamud/Utility/ItemUtil.cs b/Dalamud/Utility/ItemUtil.cs index 32160aa15..0b37a6abb 100644 --- a/Dalamud/Utility/ItemUtil.cs +++ b/Dalamud/Utility/ItemUtil.cs @@ -14,14 +14,14 @@ namespace Dalamud.Utility; /// /// Utilities related to Items. /// -internal static class ItemUtil +public static class ItemUtil { private static int? eventItemRowCount; /// Converts raw item ID to item ID with its classification. /// Raw item ID. /// Item ID and its classification. - internal static (uint ItemId, ItemKind Kind) GetBaseId(uint rawItemId) + public static (uint ItemId, ItemKind Kind) GetBaseId(uint rawItemId) { if (IsEventItem(rawItemId)) return (rawItemId, ItemKind.EventItem); // EventItem IDs are NOT adjusted if (IsHighQuality(rawItemId)) return (rawItemId - 1_000_000, ItemKind.Hq); @@ -33,7 +33,7 @@ internal static class ItemUtil /// Item ID. /// Item classification. /// Raw Item ID. - internal static uint GetRawId(uint itemId, ItemKind kind) + public static uint GetRawId(uint itemId, ItemKind kind) { return kind switch { @@ -50,7 +50,7 @@ internal static class ItemUtil /// The item id to check. /// true when the item id belongs to a normal item. [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static bool IsNormalItem(uint itemId) + public static bool IsNormalItem(uint itemId) { return itemId < 500_000; } @@ -61,7 +61,7 @@ internal static class ItemUtil /// The item id to check. /// true when the item id belongs to a collectible item. [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static bool IsCollectible(uint itemId) + public static bool IsCollectible(uint itemId) { return itemId is >= 500_000 and < 1_000_000; } @@ -72,7 +72,7 @@ internal static class ItemUtil /// The item id to check. /// true when the item id belongs to a high quality item. [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static bool IsHighQuality(uint itemId) + public static bool IsHighQuality(uint itemId) { return itemId is >= 1_000_000 and < 2_000_000; } @@ -83,7 +83,7 @@ internal static class ItemUtil /// The item id to check. /// true when the item id belongs to an event item. [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static bool IsEventItem(uint itemId) + public static bool IsEventItem(uint itemId) { return itemId >= 2_000_000 && itemId - 2_000_000 < (eventItemRowCount ??= Service.Get().GetExcelSheet().Count); } @@ -95,7 +95,7 @@ internal static class ItemUtil /// Whether to include the High Quality or Collectible icon. /// An optional client language override. /// The item name. - internal static ReadOnlySeString GetItemName(uint itemId, bool includeIcon = true, ClientLanguage? language = null) + public static ReadOnlySeString GetItemName(uint itemId, bool includeIcon = true, ClientLanguage? language = null) { var dataManager = Service.Get(); @@ -145,7 +145,7 @@ internal static class ItemUtil /// The raw item Id. /// Wheather this color is used as edge color. /// The Color row id. - internal static uint GetItemRarityColorType(uint itemId, bool isEdgeColor = false) + public static uint GetItemRarityColorType(uint itemId, bool isEdgeColor = false) { var rarity = 1u;