feat: ignore dated items
This commit is contained in:
parent
aa940c54c2
commit
f538c12601
|
@ -24,7 +24,7 @@ namespace Glamaholic.Ui {
|
|||
var info = ModelInfo(item.ModelMain);
|
||||
|
||||
foreach (var row in this.Ui.Plugin.DataManager.GetExcelSheet<Item>()!) {
|
||||
if (row.EquipSlotCategory.Row != this.Item.EquipSlotCategory.Row || info != ModelInfo(row.ModelMain)) {
|
||||
if (Util.IsItemSkipped(row) || row.EquipSlotCategory.Row != this.Item.EquipSlotCategory.Row || info != ModelInfo(row.ModelMain)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -688,6 +688,7 @@ namespace Glamaholic.Ui {
|
|||
private void FilterItems(PlateSlot slot) {
|
||||
var filter = this._itemFilter.ToLowerInvariant();
|
||||
this.FilteredItems = this.Items
|
||||
.Where(item => !Util.IsItemSkipped(item))
|
||||
.Where(item => Util.MatchesSlot(item.EquipSlotCategory.Value!, slot))
|
||||
.Where(item => this._itemFilter.Length == 0 || item.Name.RawString.ToLowerInvariant().Contains(filter))
|
||||
.ToList();
|
||||
|
|
|
@ -81,5 +81,17 @@ namespace Glamaholic {
|
|||
_ => throw new ArgumentOutOfRangeException(nameof(slot), slot, null),
|
||||
};
|
||||
}
|
||||
|
||||
// https://github.com/ufx/GarlandTools/blob/5b2ec54dc792175a1d565fddb6c6b975b9a9ff64/Garland.Data/Hacks.cs#L89
|
||||
internal static bool IsItemSkipped(Item item) {
|
||||
var name = item.Name.RawString;
|
||||
return item.RowId switch {
|
||||
// Dated Radz-at-Han Coin
|
||||
17557 => false,
|
||||
// Wrapped Present (no icon)
|
||||
22357 => true,
|
||||
_ => name.Length == 0 || name.StartsWith("Dated"),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue