using RadicadeServer.RecNet.Enums.Store; namespace RadicadeServer.Utils { public static class LevelRewardTable { public enum RewardKind { None, Consumable, Clothing } public const int LastItemLevel = LevelUpGiftService.MaxLevel; private static readonly HashSet ConsumableLevels = [1, 3, 5, 7, 9]; private static readonly HashSet ThreeStarLevels = [22, 24, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39]; private static readonly HashSet FourStarLevels = [31, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49]; public static bool IsItemLevel(int level) => level >= 1 && level <= LastItemLevel; public static RewardKind KindForLevel(int level) { if (level < 1 || level > LastItemLevel) return RewardKind.None; return ConsumableLevels.Contains(level) ? RewardKind.Consumable : RewardKind.Clothing; } public static Rarity RarityForLevel(int level) { if (level == 50) return Rarity.Legendary; if (FourStarLevels.Contains(level)) return Rarity.Epic; if (ThreeStarLevels.Contains(level)) return Rarity.Rare; return Rarity.Uncommon; } public static string StarLabel(Rarity rarity) => rarity switch { Rarity.Legendary => "5-star", Rarity.Epic => "4-star", Rarity.Rare => "3-star", Rarity.Uncommon => "2-star", _ => "1-star" }; } }