Override journal genre for some Radz-at-Han/Thavnair side quests
This commit is contained in:
parent
459b832ef2
commit
563a11d47d
@ -40,6 +40,12 @@ internal sealed class QuestData
|
|||||||
|
|
||||||
public QuestData(IDataManager dataManager)
|
public QuestData(IDataManager dataManager)
|
||||||
{
|
{
|
||||||
|
JournalGenreOverrides journalGenreOverrides = new()
|
||||||
|
{
|
||||||
|
RadzAtHanSideQuests = dataManager.GetExcelSheet<Quest>().GetRow(69805).JournalGenre.RowId,
|
||||||
|
ThavnairSideQuests = dataManager.GetExcelSheet<Quest>().GetRow(70025).JournalGenre.RowId,
|
||||||
|
};
|
||||||
|
|
||||||
Dictionary<uint, uint> questChapters =
|
Dictionary<uint, uint> questChapters =
|
||||||
dataManager.GetExcelSheet<QuestChapter>()
|
dataManager.GetExcelSheet<QuestChapter>()
|
||||||
.Where(x => x.RowId > 0 && x.Quest.RowId > 0)
|
.Where(x => x.RowId > 0 && x.Quest.RowId > 0)
|
||||||
@ -59,7 +65,7 @@ internal sealed class QuestData
|
|||||||
.Where(x => x.RowId > 0)
|
.Where(x => x.RowId > 0)
|
||||||
.Where(x => x.IssuerLocation.RowId > 0)
|
.Where(x => x.IssuerLocation.RowId > 0)
|
||||||
.Select(x => new QuestInfo(x, questChapters.GetValueOrDefault(x.RowId),
|
.Select(x => new QuestInfo(x, questChapters.GetValueOrDefault(x.RowId),
|
||||||
startingCities.GetValueOrDefault(x.RowId))),
|
startingCities.GetValueOrDefault(x.RowId), journalGenreOverrides)),
|
||||||
..dataManager.GetExcelSheet<SatisfactionNpc>()
|
..dataManager.GetExcelSheet<SatisfactionNpc>()
|
||||||
.Where(x => x is { RowId: > 0, Npc.RowId: > 0 })
|
.Where(x => x is { RowId: > 0, Npc.RowId: > 0 })
|
||||||
.Select(x => new SatisfactionSupplyInfo(x)),
|
.Select(x => new SatisfactionSupplyInfo(x)),
|
||||||
|
7
Questionable/Model/JournalGenreOverrides.cs
Normal file
7
Questionable/Model/JournalGenreOverrides.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
namespace Questionable.Model;
|
||||||
|
|
||||||
|
internal sealed class JournalGenreOverrides
|
||||||
|
{
|
||||||
|
public required uint ThavnairSideQuests { get; init; }
|
||||||
|
public required uint RadzAtHanSideQuests { get; init; }
|
||||||
|
}
|
@ -12,7 +12,7 @@ namespace Questionable.Model;
|
|||||||
|
|
||||||
internal sealed class QuestInfo : IQuestInfo
|
internal sealed class QuestInfo : IQuestInfo
|
||||||
{
|
{
|
||||||
public QuestInfo(ExcelQuest quest, uint newGamePlusChapter, byte startingCity)
|
public QuestInfo(ExcelQuest quest, uint newGamePlusChapter, byte startingCity, JournalGenreOverrides journalGenreOverrides)
|
||||||
{
|
{
|
||||||
QuestId = new QuestId((ushort)(quest.RowId & 0xFFFF));
|
QuestId = new QuestId((ushort)(quest.RowId & 0xFFFF));
|
||||||
|
|
||||||
@ -53,7 +53,12 @@ internal sealed class QuestInfo : IQuestInfo
|
|||||||
.Where(x => x.Value != 0)
|
.Where(x => x.Value != 0)
|
||||||
.ToImmutableList();
|
.ToImmutableList();
|
||||||
QuestLockJoin = (EQuestJoin)quest.QuestLockJoin;
|
QuestLockJoin = (EQuestJoin)quest.QuestLockJoin;
|
||||||
JournalGenre = quest.JournalGenre.ValueNullable?.RowId;
|
JournalGenre = QuestId.Value switch
|
||||||
|
{
|
||||||
|
>= 4196 and <= 4209 => journalGenreOverrides.ThavnairSideQuests,
|
||||||
|
4173 => journalGenreOverrides.RadzAtHanSideQuests,
|
||||||
|
_ => quest.JournalGenre.ValueNullable?.RowId,
|
||||||
|
};
|
||||||
SortKey = quest.SortKey;
|
SortKey = quest.SortKey;
|
||||||
IsMainScenarioQuest = quest.JournalGenre.ValueNullable?.JournalCategory.ValueNullable?.JournalSection
|
IsMainScenarioQuest = quest.JournalGenre.ValueNullable?.JournalCategory.ValueNullable?.JournalSection
|
||||||
.ValueNullable?.RowId is 0 or 1;
|
.ValueNullable?.RowId is 0 or 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user