1
0
annas-questmap/QuestMap/IQuestInfo.cs

29 lines
811 B
C#
Raw Normal View History

2024-11-25 18:53:44 +00:00
using System.Collections.Generic;
using Lumina.Excel.Sheets;
namespace QuestMap;
public interface IQuestInfo
{
public Quest Quest { get; }
public uint RowId { get; }
public string Name { get; }
public IEnumerable<Quest> PreviousQuests();
}
public sealed class SheetQuestInfo(Quest quest) : IQuestInfo
{
public Quest Quest => quest;
public uint RowId => quest.RowId;
public string Name => quest.Name.ToString();
public IEnumerable<Quest> PreviousQuests() => quest.PreviousQuests();
}
public sealed class ConsolidatedQuestInfo(IQuestInfo baseQuest, string name) : IQuestInfo
{
public Quest Quest => baseQuest.Quest;
public uint RowId => baseQuest.RowId;
public string Name => name;
public IEnumerable<Quest> PreviousQuests() => baseQuest.PreviousQuests();
}