Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for unidentified and corrupted items #1062

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1bf04dc
More gracefully handle exceeding the API limit.
thailyn Mar 11, 2019
a219890
Add methods to refresh the recipe view.
thailyn Jun 22, 2019
b145ebe
Reuse the same RefreshView; do not recreate it.
thailyn Jun 22, 2019
c76515c
Mark tabs as not ready after being refreshed.
thailyn Jun 23, 2019
0032521
Reuse StashView when refreshing the stash.
thailyn Jun 23, 2019
10d43d8
Fire onStashLoaded for loading inventories.
thailyn Jun 25, 2019
9993078
Revert "Revert "Item Background generation refactor""
nqrcqn Sep 2, 2019
0b577d0
Merge pull request #4 from thailyn/handle-exceeding-api-limit
nqrcqn Sep 2, 2019
4e077ae
Merge pull request #5 from thailyn/fix-memory-leaks
nqrcqn Sep 2, 2019
8fcfce1
Add other map fragments
nqrcqn Sep 2, 2019
5412f2e
Hide item level if 0
nqrcqn Sep 2, 2019
3c3d619
Merge pull request #6 from nqrcqn/hide-item-level-0
nqrcqn Sep 2, 2019
5b0e425
Revert "Dynamically update a loot filter" (#7)
nqrcqn Sep 2, 2019
84b869c
Add divination cards from 3.8 (Blight)
nqrcqn Sep 4, 2019
71aade8
Merge pull request #8 from nqrcqn/new-divination-cards
nqrcqn Sep 4, 2019
f60b3ce
Add captured beasts to forum export
nqrcqn Sep 4, 2019
0123ea0
Use white bg for scarabs, incubators and emblems
nqrcqn Sep 4, 2019
9e3c671
Add new base types and missing fated uniques
nqrcqn Sep 4, 2019
9f8bc54
Update stat filters
nqrcqn Sep 5, 2019
93fff1b
fix
nqrcqn Sep 5, 2019
8270b43
replace ToLower with ToLowerInvariant
nqrcqn Sep 5, 2019
d95dd5d
Support for unidentified and corrupted items
nqrcqn Sep 6, 2019
a0b3ee8
Add identified and uncorrupted item filters
nqrcqn Sep 6, 2019
caab3ed
fix
nqrcqn Sep 6, 2019
2d07041
Add gems to UncorruptedItemFilter
nqrcqn Sep 6, 2019
2eafaff
Change keyword for FullBestiaryOrbFilter
nqrcqn Sep 6, 2019
9e348a5
Merge pull request #29 from nqrcqn/new-divination-cards
nqrcqn Sep 6, 2019
086aee6
Merge pull request #30 from nqrcqn/captured-beasts
nqrcqn Sep 6, 2019
d90fb35
Merge pull request #31 from nqrcqn/itemhover
nqrcqn Sep 6, 2019
ed80d91
Merge pull request #32 from nqrcqn/update-filters
nqrcqn Sep 6, 2019
6951602
Merge pull request #33 from nqrcqn/fix-search
nqrcqn Sep 6, 2019
2ae2efd
Merge branch 'test6' into unidentified-corrupted
nqrcqn Sep 6, 2019
4ebb9e7
Revert "Merge branch 'test6' into unidentified-corrupted"
nqrcqn Sep 6, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion Procurement/Controls/ItemHover.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,20 @@
Converter={StaticResource bc},
ConverterParameter=CollapseWhenFalse}" />

<TextBlock Width="{Binding Path=ActualWidth,
ElementName=ItemHeader,
Mode=OneWay}"
HorizontalAlignment="Center"
FontFamily="../Resources/#Fontin SmallCaps"
Foreground="#960003"
Padding="10 0 10 5"
Text="Unidentified"
TextAlignment="Center"
TextWrapping="Wrap"
Visibility="{Binding IsUnidentified,
Converter={StaticResource bc},
ConverterParameter=CollapseWhenFalse}" />

<TextBlock Width="{Binding Path=ActualWidth,
ElementName=ItemHeader,
Mode=OneWay}"
Expand All @@ -469,7 +483,7 @@
<Border Margin="0 0 0 5"
BorderBrush="{StaticResource SeperatorBrush}"
BorderThickness="1"
Visibility="{Binding IsCorrupted,
Visibility="{Binding IsCorruptedOrUnidentified,
Converter={StaticResource VisibilityConverter},
ConverterParameter=CollapseWhenFalse}" />

Expand Down
4 changes: 4 additions & 0 deletions Procurement/Procurement.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
<Compile Include="Utility\VersionChecker.cs" />
<Compile Include="ViewModel\AdvancedSearchCategory.cs" />
<Compile Include="ViewModel\Filters\ForumExport\AccurayFilter.cs" />
<Compile Include="ViewModel\Filters\ForumExport\CorruptedItemFilter.cs" />
<Compile Include="ViewModel\Filters\ForumExport\CraftedModFilter.cs" />
<Compile Include="ViewModel\Filters\ForumExport\CurrencyFilter.cs" />
<Compile Include="ViewModel\Filters\ForumExport\DamageChaos.cs" />
Expand All @@ -196,6 +197,7 @@
<Compile Include="ViewModel\Filters\ForumExport\FullBestiaryOrbFilter.cs" />
<Compile Include="ViewModel\Filters\ForumExport\GearSearchFilters.cs" />
<Compile Include="ViewModel\Filters\ForumExport\GemLevelFilter.cs" />
<Compile Include="ViewModel\Filters\ForumExport\IdentifiedItemFilter.cs" />
<Compile Include="ViewModel\Filters\ForumExport\IncreasedDamageFilter.cs" />
<Compile Include="ViewModel\Filters\ForumExport\IncursionVialsFilter.cs" />
<Compile Include="ViewModel\Filters\ForumExport\LeagestoneFilter.cs" />
Expand All @@ -214,6 +216,8 @@
<Compile Include="ViewModel\Filters\ForumExport\SixLink.cs" />
<Compile Include="ViewModel\Filters\ForumExport\SixRedSockets.cs" />
<Compile Include="ViewModel\Filters\ForumExport\SocketColourFilter.cs" />
<Compile Include="ViewModel\Filters\ForumExport\UncorruptedItemFilter.cs" />
<Compile Include="ViewModel\Filters\ForumExport\UnidentifiedItemFilter.cs" />
<Compile Include="ViewModel\Filters\ForumExport\UnknownItemFilter.cs" />
<Compile Include="ViewModel\Filters\ForumExport\ScarabFilter.cs" />
<Compile Include="ViewModel\Filters\ForumExport\VeiledModFilter.cs" />
Expand Down
44 changes: 44 additions & 0 deletions Procurement/ViewModel/Filters/ForumExport/CorruptedItemFilter.cs
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
51 changes: 51 additions & 0 deletions Procurement/ViewModel/Filters/ForumExport/IdentifiedItemFilter.cs
Original file line number Diff line number Diff line change
@@ -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);
}
}
}
51 changes: 51 additions & 0 deletions Procurement/ViewModel/Filters/ForumExport/UncorruptedItemFilter.cs
Original file line number Diff line number Diff line change
@@ -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);
}
}
}
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
5 changes: 5 additions & 0 deletions Procurement/ViewModel/ItemHoverViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> Microtransactions { get; private set; }
public bool HasMicrotransactions { get; private set; }
public List<string> EnchantMods { get; private set; }
Expand Down Expand Up @@ -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;
Expand Down