103 lines
3 KiB
C#
103 lines
3 KiB
C#
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<PreviousQuestInfo> PreviousQuests { get; } = ImmutableList.Create(default(ReadOnlySpan<PreviousQuestInfo>));
|
|
|
|
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<EClassJob> 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<EClassJob> readOnlyList = null;
|
|
try
|
|
{
|
|
List<EClassJob> 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<EClassJob> list3 = new List<EClassJob>();
|
|
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<EClassJob> list = new List<EClassJob>();
|
|
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<EClassJob> list4 = new List<EClassJob>();
|
|
list4.AddRange(classJobUtils.AsIndividualJobs(EExtendedClassJob.DoW, null));
|
|
list4.AddRange(classJobUtils.AsIndividualJobs(EExtendedClassJob.DoM, null));
|
|
readOnlyList = new _003C_003Ez__ReadOnlyList<EClassJob>(list4);
|
|
}
|
|
ClassJobs = readOnlyList;
|
|
Expansion = (EExpansionVersion)beastTribe.Expansion.RowId;
|
|
}
|
|
}
|