diff --git a/Procurement/Controls/ItemHover.xaml b/Procurement/Controls/ItemHover.xaml index 51e81771..5527d8d2 100644 --- a/Procurement/Controls/ItemHover.xaml +++ b/Procurement/Controls/ItemHover.xaml @@ -452,6 +452,20 @@ Converter={StaticResource bc}, ConverterParameter=CollapseWhenFalse}" /> + + diff --git a/Procurement/Procurement.csproj b/Procurement/Procurement.csproj index 8c3ce64c..fe315156 100644 --- a/Procurement/Procurement.csproj +++ b/Procurement/Procurement.csproj @@ -182,6 +182,7 @@ + @@ -196,6 +197,7 @@ + @@ -214,6 +216,8 @@ + + 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..35606154 --- /dev/null +++ b/Procurement/ViewModel/Filters/ForumExport/IdentifiedItemFilter.cs @@ -0,0 +1,51 @@ +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) + { + if (item.TypeLine.Contains("Sacrifice at ") || item.TypeLine.Contains("Mortal ") || item.TypeLine.Contains(" Key") || item.TypeLine.Contains("Fragment of the ") || item.TypeLine.Contains(" Breachstone")) + return false; + + if (item is Map && item.Identified) + return true; + + Gear gear = item as Gear; + return gear != null && gear.Identified && !(gear.MaxStackSize > 0); + } + } +} diff --git a/Procurement/ViewModel/Filters/ForumExport/UncorruptedItemFilter.cs b/Procurement/ViewModel/Filters/ForumExport/UncorruptedItemFilter.cs new file mode 100644 index 00000000..78f1807c --- /dev/null +++ b/Procurement/ViewModel/Filters/ForumExport/UncorruptedItemFilter.cs @@ -0,0 +1,51 @@ +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) + { + if (item.TypeLine.Contains("Sacrifice at ") || item.TypeLine.Contains("Mortal ") || item.TypeLine.Contains(" Key") || item.TypeLine.Contains("Fragment of the ") || item.TypeLine.Contains(" Breachstone")) + return false; + + if ((item is Map || item is Gem) && !item.Corrupted) + return true; + + Gear gear = item as Gear; + return gear != null && !gear.Corrupted && !(gear.MaxStackSize > 0); + } + } +} diff --git a/Procurement/ViewModel/Filters/ForumExport/UnidentifiedItemFilter.cs b/Procurement/ViewModel/Filters/ForumExport/UnidentifiedItemFilter.cs new file mode 100644 index 00000000..caee2a8e --- /dev/null +++ b/Procurement/ViewModel/Filters/ForumExport/UnidentifiedItemFilter.cs @@ -0,0 +1,44 @@ +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) + { + return !item.Identified; + } + } +} diff --git a/Procurement/ViewModel/ItemHoverViewModel.cs b/Procurement/ViewModel/ItemHoverViewModel.cs index 03f5b846..c4220e14 100644 --- a/Procurement/ViewModel/ItemHoverViewModel.cs +++ b/Procurement/ViewModel/ItemHoverViewModel.cs @@ -26,6 +26,8 @@ public class ItemHoverViewModel public string DescriptionText { get; private set; } public string SecondaryDescriptionText { get; private set; } public bool IsCorrupted { get; private set; } + public bool IsUnidentified { get; private set; } + public bool IsCorruptedOrUnidentified { get; private set; } public List Microtransactions { get; private set; } public bool HasMicrotransactions { get; private set; } public List EnchantMods { get; private set; } @@ -96,6 +98,9 @@ public ItemHoverViewModel(Item item) this.DescriptionText = item.DescrText; this.IsCorrupted = item.Corrupted; + this.IsUnidentified = !item.Identified; + if (item.Corrupted || !item.Identified) + this.IsCorruptedOrUnidentified = true; this.Microtransactions = item.Microtransactions; this.HasMicrotransactions = item.Microtransactions.Count > 0;