diff --git a/Procurement/Procurement.csproj b/Procurement/Procurement.csproj index 8c3ce64c..f6526abb 100644 --- a/Procurement/Procurement.csproj +++ b/Procurement/Procurement.csproj @@ -196,6 +196,7 @@ + @@ -214,6 +215,9 @@ + + + diff --git a/Procurement/ViewModel/Filters/ForumExport/CorruptedItemFilter.cs b/Procurement/ViewModel/Filters/ForumExport/CorruptedItemFilter.cs new file mode 100644 index 00000000..80a386a0 --- /dev/null +++ b/Procurement/ViewModel/Filters/ForumExport/CorruptedItemFilter.cs @@ -0,0 +1,44 @@ +using POEApi.Model; + +namespace Procurement.ViewModel.Filters.ForumExport +{ + public class CorruptedItemFilter : IFilter + { + public bool CanFormCategory + { + get + { + return false; + } + } + + public string Keyword + { + get + { + return "Corrupted Items"; + } + } + + public string Help + { + get + { + return "Corrupted Items"; + } + } + + public FilterGroup Group + { + get + { + return FilterGroup.Default; + } + } + + public bool Applicable(Item item) + { + return item.Corrupted; + } + } +} diff --git a/Procurement/ViewModel/Filters/ForumExport/IdentifiedItemFilter.cs b/Procurement/ViewModel/Filters/ForumExport/IdentifiedItemFilter.cs new file mode 100644 index 00000000..46353b35 --- /dev/null +++ b/Procurement/ViewModel/Filters/ForumExport/IdentifiedItemFilter.cs @@ -0,0 +1,44 @@ +using POEApi.Model; + +namespace Procurement.ViewModel.Filters.ForumExport +{ + public class IdentifiedItemFilter : IFilter + { + public bool CanFormCategory + { + get + { + return false; + } + } + + public string Keyword + { + get + { + return "Identified Items"; + } + } + + public string Help + { + get + { + return "Identified Items"; + } + } + + public FilterGroup Group + { + get + { + return FilterGroup.Default; + } + } + + public bool Applicable(Item item) + { + return item.Identified && item.ItemLevel > 0 && !(item.StackSize > 0) && !(item is Incubator) && !(item is FullBestiaryOrb); + } + } +} diff --git a/Procurement/ViewModel/Filters/ForumExport/UncorruptedItemFilter.cs b/Procurement/ViewModel/Filters/ForumExport/UncorruptedItemFilter.cs new file mode 100644 index 00000000..715893d6 --- /dev/null +++ b/Procurement/ViewModel/Filters/ForumExport/UncorruptedItemFilter.cs @@ -0,0 +1,48 @@ +using POEApi.Model; + +namespace Procurement.ViewModel.Filters.ForumExport +{ + public class UncorruptedItemFilter : IFilter + { + public bool CanFormCategory + { + get + { + return false; + } + } + + public string Keyword + { + get + { + return "Uncorrupted Items"; + } + } + + public string Help + { + get + { + return "Uncorrupted Items"; + } + } + + public FilterGroup Group + { + get + { + return FilterGroup.Default; + } + } + + public bool Applicable(Item item) + { + Gear gear = item as Gear; + + return !item.Corrupted + && (item is Gem || (item.ItemLevel > 0 && !(item.StackSize > 0) && (!gear?.GearType.Equals(GearType.Flask) ?? true))) + && !(item is Incubator) && !(item is FullBestiaryOrb); + } + } +} diff --git a/Procurement/ViewModel/Filters/ForumExport/UnidentifiedItemFilter.cs b/Procurement/ViewModel/Filters/ForumExport/UnidentifiedItemFilter.cs new file mode 100644 index 00000000..c58c2703 --- /dev/null +++ b/Procurement/ViewModel/Filters/ForumExport/UnidentifiedItemFilter.cs @@ -0,0 +1,45 @@ +using POEApi.Model; + +namespace Procurement.ViewModel.Filters.ForumExport +{ + public class UnidentifiedItemFilter : IFilter + { + public bool CanFormCategory + { + get + { + return false; + } + } + + public string Keyword + { + get + { + return "Unidentified Items"; + } + } + + public string Help + { + get + { + return "Unidentified Items"; + } + } + + public FilterGroup Group + { + get + { + return FilterGroup.Default; + } + } + + public bool Applicable(Item item) + { + // Item types that can't be unidentified always have identified value as true so a simple check is sufficient + return !item.Identified; + } + } +}