1
0
Fork 0

Don't show gil/mgp/allagan tomestones in item search (although they wouldn't be discarded anyway)

master v3.8
Liza 2023-11-28 17:30:57 +01:00
parent be97c709f8
commit 239cb18968
Signed by: liza
GPG Key ID: 7199F8D727D55F67
3 changed files with 17 additions and 12 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net7.0-windows</TargetFramework>
<Version>3.7</Version> <Version>3.8</Version>
<LangVersion>11.0</LangVersion> <LangVersion>11.0</LangVersion>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

View File

@ -1,4 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
namespace ARDiscard.GameData; namespace ARDiscard.GameData;
@ -8,19 +9,22 @@ internal static class InternalConfiguration
/// Not all of these *can* be discarded, but we shouldn't attempt it either. /// Not all of these *can* be discarded, but we shouldn't attempt it either.
/// </summary> /// </summary>
public static readonly IReadOnlyList<uint> BlacklistedItems = new List<uint> public static readonly IReadOnlyList<uint> BlacklistedItems = new List<uint>
{ {
2820, // red onion helm 2820, // red onion helm
16039, // ala mhigan earrings 16039, // ala mhigan earrings
24589, // aetheryte earrings 24589, // aetheryte earrings
33648, // menphina's earrings 33648, // menphina's earrings
21197, // UCOB token 21197, // UCOB token
23175, // UWU token 23175, // UWU token
28633, // TEA token 28633, // TEA token
36810, // DSR token 36810, // DSR token
38951, // TOP token 38951, // TOP token
}.AsReadOnly(); }
.Concat(Enumerable.Range(1, 99).Select(x => (uint)x))
.ToList()
.AsReadOnly();
/// <summary> /// <summary>
/// Items that are unique/untradeable, but should still be possible to discard. This is moreso because /// Items that are unique/untradeable, but should still be possible to discard. This is moreso because

View File

@ -380,6 +380,7 @@ internal sealed class ConfigWindow : LImGui.LWindow
if (_allItems == null) if (_allItems == null)
{ {
_allItems = _itemCache.AllItems _allItems = _itemCache.AllItems
.Where(x => !InternalConfiguration.BlacklistedItems.Contains(x.ItemId))
.Where(x => InternalConfiguration.WhitelistedItems.Contains(x.ItemId) || .Where(x => InternalConfiguration.WhitelistedItems.Contains(x.ItemId) ||
x is { IsUnique: false, IsUntradable: false, IsIndisposable: false }) x is { IsUnique: false, IsUntradable: false, IsIndisposable: false })
.Where(x => x.UiCategory != UiCategories.Currency && x.UiCategory != UiCategories.Crystals && .Where(x => x.UiCategory != UiCategories.Currency && x.UiCategory != UiCategories.Crystals &&