qstbak/Questionable/Questionable.Model/SatisfactionSupplyInfo.cs
2025-10-09 07:47:19 +10:00

53 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using LLib.GameData;
using Lumina.Excel.Sheets;
using Questionable.Model.Questing;
namespace Questionable.Model;
internal sealed class SatisfactionSupplyInfo : IQuestInfo
{
public ElementId QuestId { get; }
public string Name { get; }
public uint IssuerDataId { get; }
public bool IsRepeatable => true;
public ImmutableList<PreviousQuestInfo> PreviousQuests { get; }
public EQuestJoin PreviousQuestJoin => EQuestJoin.All;
public ushort Level { get; }
public EAlliedSociety AlliedSociety => EAlliedSociety.None;
public uint? JournalGenre => null;
public ushort SortKey { get; }
public bool IsMainScenarioQuest => false;
public EExpansionVersion Expansion { get; }
public IReadOnlyList<EClassJob> ClassJobs { get; } = new global::_003C_003Ez__ReadOnlyArray<EClassJob>(new EClassJob[2]
{
EClassJob.Miner,
EClassJob.Botanist
});
public SatisfactionSupplyInfo(SatisfactionNpc npc)
{
QuestId = new SatisfactionSupplyNpcId((ushort)npc.RowId);
Name = npc.Npc.Value.Singular.ToString();
IssuerDataId = npc.Npc.RowId;
Level = npc.LevelUnlock;
SortKey = QuestId.Value;
Expansion = (EExpansionVersion)npc.QuestRequired.Value.Expansion.RowId;
PreviousQuestInfo reference = new PreviousQuestInfo(Questionable.Model.Questing.QuestId.FromRowId(npc.QuestRequired.RowId), 0);
PreviousQuests = ImmutableList.Create(new ReadOnlySpan<PreviousQuestInfo>(in reference));
}
}