Version bump, remove redundant nullability checks, minor cleanup
This commit is contained in:
parent
3ab1069ab7
commit
40b31ba274
@ -1,5 +1,5 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>4.1</Version>
|
<Version>4.2</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
2
LLib
2
LLib
@ -1 +1 @@
|
|||||||
Subproject commit 70b0bef2459898a70f7b34b4d196bbaeb72397b1
|
Subproject commit e4bbc05ede6f6f01e7028b24614ed8cb333e909c
|
@ -756,12 +756,12 @@ internal sealed class InteractionUiController : IDisposable
|
|||||||
private bool TryFindWarp(ushort targetTerritoryId, string actualPrompt, [NotNullWhen(true)] out uint? warpId,
|
private bool TryFindWarp(ushort targetTerritoryId, string actualPrompt, [NotNullWhen(true)] out uint? warpId,
|
||||||
[NotNullWhen(true)] out string? warpText)
|
[NotNullWhen(true)] out string? warpText)
|
||||||
{
|
{
|
||||||
var warps = _dataManager.GetExcelSheet<Warp>()!
|
var warps = _dataManager.GetExcelSheet<Warp>()
|
||||||
.Where(x => x.RowId > 0 && x.TerritoryType.RowId == targetTerritoryId);
|
.Where(x => x.RowId > 0 && x.TerritoryType.RowId == targetTerritoryId);
|
||||||
foreach (var entry in warps)
|
foreach (var entry in warps)
|
||||||
{
|
{
|
||||||
string? excelName = entry.Name.ToString();
|
string excelName = entry.Name.ToString();
|
||||||
string? excelQuestion = entry.Question.ToString();
|
string excelQuestion = entry.Question.ToString();
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(excelQuestion) && GameFunctions.GameStringEquals(excelQuestion, actualPrompt))
|
if (!string.IsNullOrEmpty(excelQuestion) && GameFunctions.GameStringEquals(excelQuestion, actualPrompt))
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ internal sealed class AetherCurrentData
|
|||||||
|
|
||||||
public AetherCurrentData(IDataManager dataManager)
|
public AetherCurrentData(IDataManager dataManager)
|
||||||
{
|
{
|
||||||
_overworldCurrents = dataManager.GetExcelSheet<AetherCurrentCompFlgSet>()!
|
_overworldCurrents = dataManager.GetExcelSheet<AetherCurrentCompFlgSet>()
|
||||||
.Where(x => x.RowId > 0)
|
.Where(x => x.RowId > 0)
|
||||||
.Where(x => x.Territory.IsValid)
|
.Where(x => x.Territory.IsValid)
|
||||||
.ToImmutableDictionary(
|
.ToImmutableDictionary(
|
||||||
|
@ -40,7 +40,7 @@ internal sealed class QuestData
|
|||||||
public QuestData(IDataManager dataManager)
|
public QuestData(IDataManager dataManager)
|
||||||
{
|
{
|
||||||
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)
|
||||||
.ToDictionary(x => x.Quest.RowId, x => x.Redo.RowId);
|
.ToDictionary(x => x.Quest.RowId, x => x.Redo.RowId);
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ internal sealed unsafe class ChatFunctions
|
|||||||
.Where(x => x.TextCommand.IsValid)
|
.Where(x => x.TextCommand.IsValid)
|
||||||
.Select(x => (x.RowId, Command: x.TextCommand.Value.Command.ToString()))
|
.Select(x => (x.RowId, Command: x.TextCommand.Value.Command.ToString()))
|
||||||
.Where(x => !string.IsNullOrEmpty(x.Command) && x.Command.StartsWith('/'))
|
.Where(x => !string.IsNullOrEmpty(x.Command) && x.Command.StartsWith('/'))
|
||||||
.ToDictionary(x => (EEmote)x.RowId, x => x.Command!)
|
.ToDictionary(x => (EEmote)x.RowId, x => x.Command)
|
||||||
.AsReadOnly();
|
.AsReadOnly();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,9 +129,6 @@ internal sealed unsafe class QuestFunctions
|
|||||||
var trackedQuest = questManager->TrackedQuests[i];
|
var trackedQuest = questManager->TrackedQuests[i];
|
||||||
switch (trackedQuest.QuestType)
|
switch (trackedQuest.QuestType)
|
||||||
{
|
{
|
||||||
default:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1: // normal quest
|
case 1: // normal quest
|
||||||
currentQuest = new QuestId(questManager->NormalQuests[trackedQuest.Index].QuestId);
|
currentQuest = new QuestId(questManager->NormalQuests[trackedQuest.Index].QuestId);
|
||||||
if (_questRegistry.IsKnownQuest(currentQuest))
|
if (_questRegistry.IsKnownQuest(currentQuest))
|
||||||
@ -629,7 +626,7 @@ internal sealed unsafe class QuestFunctions
|
|||||||
|
|
||||||
public bool IsClassJobUnlocked(EClassJob classJob)
|
public bool IsClassJobUnlocked(EClassJob classJob)
|
||||||
{
|
{
|
||||||
var classJobRow = _dataManager.GetExcelSheet<ClassJob>()!.GetRow((uint)classJob)!;
|
var classJobRow = _dataManager.GetExcelSheet<ClassJob>().GetRow((uint)classJob);
|
||||||
var questId = (ushort)classJobRow.UnlockQuest.RowId;
|
var questId = (ushort)classJobRow.UnlockQuest.RowId;
|
||||||
if (questId != 0)
|
if (questId != 0)
|
||||||
return IsQuestComplete(new QuestId(questId));
|
return IsQuestComplete(new QuestId(questId));
|
||||||
@ -640,7 +637,7 @@ internal sealed unsafe class QuestFunctions
|
|||||||
|
|
||||||
public bool IsJobUnlocked(EClassJob classJob)
|
public bool IsJobUnlocked(EClassJob classJob)
|
||||||
{
|
{
|
||||||
var classJobRow = _dataManager.GetExcelSheet<ClassJob>()!.GetRow((uint)classJob)!;
|
var classJobRow = _dataManager.GetExcelSheet<ClassJob>().GetRow((uint)classJob);
|
||||||
return IsClassJobUnlocked((EClassJob)classJobRow.ClassJobParent.RowId);
|
return IsClassJobUnlocked((EClassJob)classJobRow.ClassJobParent.RowId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ internal sealed class SatisfactionSupplyInfo : IQuestInfo
|
|||||||
IssuerDataId = npc.Npc.RowId;
|
IssuerDataId = npc.Npc.RowId;
|
||||||
Level = npc.LevelUnlock;
|
Level = npc.LevelUnlock;
|
||||||
SortKey = QuestId.Value;
|
SortKey = QuestId.Value;
|
||||||
Expansion = (EExpansionVersion)npc.QuestRequired.Value!.Expansion.RowId;
|
Expansion = (EExpansionVersion)npc.QuestRequired.Value.Expansion.RowId;
|
||||||
PreviousQuests = [new PreviousQuestInfo(new QuestId((ushort)(npc.QuestRequired.RowId & 0xFFFF)))];
|
PreviousQuests = [new PreviousQuestInfo(new QuestId((ushort)(npc.QuestRequired.RowId & 0xFFFF)))];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,9 +108,9 @@ internal sealed class GatheringJournalComponent
|
|||||||
.GroupBy(x => x.GatheringPointId)
|
.GroupBy(x => x.GatheringPointId)
|
||||||
.ToDictionary(x => x.Key, x => x.First());
|
.ToDictionary(x => x.Key, x => x.First());
|
||||||
|
|
||||||
var itemSheet = dataManager.GetExcelSheet<Item>()!;
|
var itemSheet = dataManager.GetExcelSheet<Item>();
|
||||||
|
|
||||||
_gatheringItems = dataManager.GetExcelSheet<GatheringItem>()!
|
_gatheringItems = dataManager.GetExcelSheet<GatheringItem>()
|
||||||
.Where(x => x.RowId != 0 && x.GatheringItemLevel.RowId != 0)
|
.Where(x => x.RowId != 0 && x.GatheringItemLevel.RowId != 0)
|
||||||
.Select(x => new
|
.Select(x => new
|
||||||
{
|
{
|
||||||
@ -120,7 +120,7 @@ internal sealed class GatheringJournalComponent
|
|||||||
.Where(x => !string.IsNullOrEmpty(x.Name))
|
.Where(x => !string.IsNullOrEmpty(x.Name))
|
||||||
.ToDictionary(x => x.GatheringItemId, x => x.Name!);
|
.ToDictionary(x => x.GatheringItemId, x => x.Name!);
|
||||||
|
|
||||||
_gatheringPointsByExpansion = dataManager.GetExcelSheet<GatheringPoint>()!
|
_gatheringPointsByExpansion = dataManager.GetExcelSheet<GatheringPoint>()
|
||||||
.Where(x => x.GatheringPointBase.RowId != 0)
|
.Where(x => x.GatheringPointBase.RowId != 0)
|
||||||
.Where(x => x.GatheringPointBase.RowId is < 653 or > 680) // exclude ishgard restoration phase 1
|
.Where(x => x.GatheringPointBase.RowId is < 653 or > 680) // exclude ishgard restoration phase 1
|
||||||
.DistinctBy(x => x.GatheringPointBase.RowId)
|
.DistinctBy(x => x.GatheringPointBase.RowId)
|
||||||
@ -128,7 +128,7 @@ internal sealed class GatheringJournalComponent
|
|||||||
{
|
{
|
||||||
GatheringPointId = x.RowId,
|
GatheringPointId = x.RowId,
|
||||||
Point = new DefaultGatheringPoint(new GatheringPointId((ushort)x.GatheringPointBase.RowId),
|
Point = new DefaultGatheringPoint(new GatheringPointId((ushort)x.GatheringPointBase.RowId),
|
||||||
x.GatheringPointBase.Value!.GatheringType.RowId switch
|
x.GatheringPointBase.Value.GatheringType.RowId switch
|
||||||
{
|
{
|
||||||
0 or 1 => EClassJob.Miner,
|
0 or 1 => EClassJob.Miner,
|
||||||
2 or 3 => EClassJob.Botanist,
|
2 or 3 => EClassJob.Botanist,
|
||||||
@ -159,7 +159,7 @@ internal sealed class GatheringJournalComponent
|
|||||||
_gatheringPointRegistry.TryGetGatheringPoint(x.Point.Id, out GatheringRoot? gatheringRoot))
|
_gatheringPointRegistry.TryGetGatheringPoint(x.Point.Id, out GatheringRoot? gatheringRoot))
|
||||||
{
|
{
|
||||||
// for some reason the game doesn't know where this gathering location is
|
// for some reason the game doesn't know where this gathering location is
|
||||||
var territoryType = territoryTypeSheet.GetRow(gatheringRoot.Steps.Last().TerritoryId)!;
|
var territoryType = territoryTypeSheet.GetRow(gatheringRoot.Steps.Last().TerritoryId);
|
||||||
return x.Point with
|
return x.Point with
|
||||||
{
|
{
|
||||||
Expansion = (EExpansionVersion)territoryType.ExVersion.RowId,
|
Expansion = (EExpansionVersion)territoryType.ExVersion.RowId,
|
||||||
|
Loading…
Reference in New Issue
Block a user