Files
HSMappy/Mappy/Classes/Caches/AetheryteAethernetCache.cs
T
2026-02-26 03:54:51 -05:00

18 lines
678 B
C#

using KamiLib.Classes;
using KamiLib.Extensions;
using Lumina.Excel.Sheets;
namespace Mappy.Classes.Caches;
public class AetheryteAethernetCache : Cache<uint, Aetheryte?>
{
protected override Aetheryte? LoadValue(uint key)
{
if (Service.DataManager.GetExcelSheet<Aetheryte>().FirstOrNull(aetheryte => aetheryte.AethernetName.RowId == key) is not { AethernetGroup: var aethernetGroup })
return null;
if (Service.DataManager.GetExcelSheet<Aetheryte>().FirstOrNull(aetheryte => aetheryte.IsAetheryte && aetheryte.AethernetGroup == aethernetGroup) is not { } targetAetheryte)
return null;
return targetAetheryte;
}
}