muffin v7.5.11
This commit is contained in:
parent
addf2d530f
commit
3102923ce2
522 changed files with 41082 additions and 211592 deletions
|
|
@ -0,0 +1,31 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Lumina.Excel.Sheets;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.Questing;
|
||||
|
||||
namespace Questionable.Controller.CustomDelivery;
|
||||
|
||||
internal sealed class CustomDeliveryNpcData
|
||||
{
|
||||
private readonly List<CustomDeliveryNpc> _npcs;
|
||||
|
||||
private readonly Dictionary<ushort, CustomDeliveryNpc> _npcsByRowId;
|
||||
|
||||
public IReadOnlyList<CustomDeliveryNpc> AllNpcs => _npcs;
|
||||
|
||||
public CustomDeliveryNpcData(IDataManager dataManager)
|
||||
{
|
||||
_npcs = (from x in dataManager.GetExcelSheet<SatisfactionNpc>()
|
||||
where x.RowId != 0 && x.Npc.RowId != 0
|
||||
select new CustomDeliveryNpc((int)(x.RowId - 1), (ushort)x.RowId, x.Npc.Value.Singular.ToString(), x.LevelUnlock, (EExpansionVersion)x.QuestRequired.Value.Expansion.RowId, QuestId.FromRowId(x.QuestRequired.RowId))).ToList();
|
||||
_npcsByRowId = _npcs.ToDictionary((CustomDeliveryNpc x) => x.NpcRowId);
|
||||
}
|
||||
|
||||
public bool TryGetByRowId(ushort npcRowId, [NotNullWhen(true)] out CustomDeliveryNpc? npc)
|
||||
{
|
||||
return _npcsByRowId.TryGetValue(npcRowId, out npc);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue