Filtration/Filtration.ObjectModel/Extensions/ItemRarityExtensions.cs

37 lines
1.1 KiB
C#
Raw Permalink Normal View History

using System;
using System.Windows.Media;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.Extensions
{
public static class ItemRarityExtensions
{
public static Color DefaultRarityTextColor(this ItemRarity itemRarity)
{
switch (itemRarity)
{
case ItemRarity.Magic:
{
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.MagicItem];
}
case ItemRarity.Normal:
{
2018-12-05 15:39:20 -05:00
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.WhiteItem];
}
case ItemRarity.Rare:
{
2018-12-05 15:39:20 -05:00
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.RareItem];
}
case ItemRarity.Unique:
{
2018-12-05 15:39:20 -05:00
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.UniqueItem];
}
default:
2018-12-05 15:39:20 -05:00
{
throw new ArgumentOutOfRangeException(nameof(itemRarity), itemRarity, null);
2018-12-05 15:39:20 -05:00
}
}
}
}
}