Files
GlamourBrowser/GlamourBrowser/DataCache.cs
Administrator a5d3b2092d
Some checks failed
Build and Release / Build (push) Failing after 41s
first commit
2026-01-01 13:06:22 +02:00

27 lines
1.1 KiB
C#

using Dalamud.Game;
using Lumina.Excel.Sheets;
using Lumina.Extensions;
using System;
using System.Collections.Immutable;
using System.Linq;
namespace Glamaholic {
internal class DataCache {
public static Lazy<ImmutableList<Item>> EquippableItems { get; } =
new(() => Service.DataManager.GetExcelSheet<Item>(ClientLanguage.English)!
.Where(row => row.EquipSlotCategory.RowId != 0 &&
row.EquipSlotCategory.Value!.SoulCrystal == 0)
.ToImmutableList());
/*
public static Lazy<ImmutableDictionary<string, byte>> StainLookup { get; } =
new (() =>
Service.DataManager.GetExcelSheet<Stain>(ClientLanguage.English)!
.Where(static row => row.RowId != 0 && !row.Name.IsEmpty)
.ToImmutableDictionary(static row =>
row.Name.ExtractText().Trim().ToLower(), static row => (byte) row.RowId));
public static int GetNumStainSlots(uint itemId) =>
Service.DataManager.GetExcelSheet<Item>(ClientLanguage.English)!.GetRowOrDefault(itemId)?.DyeCount ?? 0;*/
}
}