Filtration/Filtration.ObjectModel/BlockItemTypes/RarityBlockItem.cs

96 lines
2.3 KiB
C#
Raw Permalink Normal View History

2015-06-04 13:15:54 -04:00
using System.Windows.Media;
2015-06-24 14:57:16 -04:00
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.Enums;
using Filtration.ObjectModel.Extensions;
using Filtration.ObjectModel.LootExplosionStudio;
2015-06-04 13:15:54 -04:00
2015-06-24 14:57:16 -04:00
namespace Filtration.ObjectModel.BlockItemTypes
2015-06-04 13:15:54 -04:00
{
2015-06-24 14:57:16 -04:00
public class RarityBlockItem : NumericFilterPredicateBlockItem
2015-06-04 13:15:54 -04:00
{
public RarityBlockItem()
{
}
public RarityBlockItem(FilterPredicateOperator predicateOperator, int predicateOperand)
: base(predicateOperator, predicateOperand)
{
}
2015-06-23 17:21:10 -04:00
2015-06-04 13:15:54 -04:00
public override string PrefixText
{
get { return "Rarity"; }
}
2015-06-23 17:21:10 -04:00
public override string OutputText
{
get
{
return PrefixText + " " + FilterPredicate.PredicateOperator
.GetAttributeDescription() +
" " +
((ItemRarity) FilterPredicate.PredicateOperand)
.GetAttributeDescription();
}
}
2015-06-04 13:15:54 -04:00
public override int MaximumAllowed
{
get { return 2; }
}
public override string DisplayHeading
{
get
{
return "Item Rarity";
}
}
public override string SummaryText
{
get
{
return "Rarity " + FilterPredicate.PredicateOperator.GetAttributeDescription() + " " +
((ItemRarity) FilterPredicate.PredicateOperand).GetAttributeDescription();
}
}
public override Color SummaryBackgroundColor
{
get { return Colors.LightCoral; }
}
public override Color SummaryTextColor
{
get { return Colors.White; }
}
public override int SortOrder
{
get { return 4; }
}
public override int Minimum
{
get
{
return 0;
}
}
public override int Maximum
{
get
{
return (int)ItemRarity.Unique;
}
}
public override int GetLootItemProperty(LootItem lootItem)
{
return (int)lootItem.Rarity;
}
2015-06-04 13:15:54 -04:00
}
}