using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; using LLib.GameData; using Lumina.Excel.Sheets; using Questionable.Data; using Questionable.Model.Questing; namespace Questionable.Model; internal sealed class AlliedSocietyDailyInfo : IQuestInfo { public ElementId QuestId { get; } public string Name { get; } public uint IssuerDataId => 0u; public ImmutableList PreviousQuests { get; } = ImmutableList.Create(default(ReadOnlySpan)); public EQuestJoin PreviousQuestJoin => EQuestJoin.All; public bool IsRepeatable => true; public ushort Level => 1; public EAlliedSociety AlliedSociety => EAlliedSociety.None; public uint? JournalGenre => null; public ushort SortKey => 0; public bool IsMainScenarioQuest => false; public IReadOnlyList ClassJobs { get; } public EExpansionVersion Expansion { get; } public AlliedSocietyDailyInfo(BeastTribe beastTribe, byte rank, ClassJobUtils classJobUtils) { QuestId = new AlliedSocietyDailyId((byte)beastTribe.RowId, rank); Name = beastTribe.Name.ToString(); IReadOnlyList readOnlyList = null; try { List list2; switch ((EAlliedSociety)(byte)beastTribe.RowId) { case EAlliedSociety.Amaljaa: case EAlliedSociety.Sylphs: case EAlliedSociety.Kobolds: case EAlliedSociety.Sahagin: case EAlliedSociety.VanuVanu: case EAlliedSociety.Vath: case EAlliedSociety.Kojin: case EAlliedSociety.Ananta: case EAlliedSociety.Pixies: case EAlliedSociety.Arkasodara: case EAlliedSociety.Pelupelu: { List list3 = new List(); list3.AddRange(classJobUtils.AsIndividualJobs(EExtendedClassJob.DoW, null)); list3.AddRange(classJobUtils.AsIndividualJobs(EExtendedClassJob.DoM, null)); list2 = list3; break; } case EAlliedSociety.Ixal: case EAlliedSociety.Moogles: case EAlliedSociety.Dwarves: case EAlliedSociety.Loporrits: case EAlliedSociety.YokHuy: list2 = classJobUtils.AsIndividualJobs(EExtendedClassJob.DoH, null).ToList(); break; case EAlliedSociety.Qitari: case EAlliedSociety.Omicrons: case EAlliedSociety.MamoolJa: list2 = classJobUtils.AsIndividualJobs(EExtendedClassJob.DoL, null).ToList(); break; case EAlliedSociety.Namazu: { List list = new List(); list.AddRange(classJobUtils.AsIndividualJobs(EExtendedClassJob.DoH, null)); list.AddRange(classJobUtils.AsIndividualJobs(EExtendedClassJob.DoL, null)); list2 = list; break; } default: throw new ArgumentOutOfRangeException("beastTribe"); } readOnlyList = list2; } catch (ArgumentOutOfRangeException) { List list4 = new List(); list4.AddRange(classJobUtils.AsIndividualJobs(EExtendedClassJob.DoW, null)); list4.AddRange(classJobUtils.AsIndividualJobs(EExtendedClassJob.DoM, null)); readOnlyList = new _003C_003Ez__ReadOnlyList(list4); } ClassJobs = readOnlyList; Expansion = (EExpansionVersion)beastTribe.Expansion.RowId; } }