diff --git a/LLib b/LLib index 538329a1..70b0bef2 160000 --- a/LLib +++ b/LLib @@ -1 +1 @@ -Subproject commit 538329a1e80acbcd09e28bd6dd459c35b5563c0a +Subproject commit 70b0bef2459898a70f7b34b4d196bbaeb72397b1 diff --git a/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5244_A Royal Invitation.json b/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5244_A Royal Invitation.json new file mode 100644 index 00000000..320302f8 --- /dev/null +++ b/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5244_A Royal Invitation.json @@ -0,0 +1,126 @@ +{ + "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", + "Author": "liza", + "QuestSequence": [ + { + "Sequence": 0, + "Steps": [ + { + "DataId": 1047679, + "Position": { + "X": -165.36206, + "Y": -14.999356, + "Z": 203.93677 + }, + "TerritoryId": 1185, + "InteractionType": "AcceptQuest", + "AetheryteShortcut": "Tuliyollal", + "AethernetShortcut": [ + "[Tuliyollal] Aetheryte Plaza", + "[Tuliyollal] The For'ard Cabins" + ] + } + ] + }, + { + "Sequence": 1, + "Steps": [ + { + "DataId": 1046521, + "Position": { + "X": -46.616333, + "Y": -17.97287, + "Z": 180.3158 + }, + "StopDistance": 5, + "TerritoryId": 1185, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 2, + "Steps": [ + { + "DataId": 2014470, + "Position": { + "X": -32.700073, + "Y": -17.47168, + "Z": 184.9851 + }, + "TerritoryId": 1185, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 3, + "Steps": [ + { + "DataId": 1047501, + "Position": { + "X": -189.80707, + "Y": 120.74999, + "Z": -367.14734 + }, + "TerritoryId": 1185, + "InteractionType": "Interact", + "AethernetShortcut": [ + "[Tuliyollal] Bayside Bevy Marketplace", + "[Tuliyollal] Vollok Shoonsa" + ], + "DialogueChoices": [ + { + "Type": "YesNo", + "Prompt": "TEXT_KINGMG101_05244_SYSTEM_000_301", + "Yes": true + } + ] + } + ] + }, + { + "Sequence": 255, + "Steps": [ + { + "DataId": 1048083, + "Position": { + "X": 302.05237, + "Y": 51.199978, + "Z": 205.0354 + }, + "TerritoryId": 1186, + "InteractionType": "Interact", + "AetheryteShortcut": "Solution Nine", + "AethernetShortcut": [ + "[Solution Nine] Aetheryte Plaza", + "[Solution Nine] Neon Stein" + ], + "TargetTerritoryId": 1207, + "SkipConditions": { + "AetheryteShortcutIf": { + "InTerritory": [ + 1207 + ] + }, + "StepIf": { + "InTerritory": [ + 1207 + ] + } + } + }, + { + "DataId": 1052185, + "Position": { + "X": -4.837158, + "Y": -3.632158E-08, + "Z": 5.996765 + }, + "TerritoryId": 1207, + "InteractionType": "CompleteQuest" + } + ] + } + ] +} diff --git a/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5245_Alexandria Mourns.json b/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5245_Alexandria Mourns.json new file mode 100644 index 00000000..6d37db44 --- /dev/null +++ b/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5245_Alexandria Mourns.json @@ -0,0 +1,74 @@ +{ + "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", + "Author": "liza", + "QuestSequence": [ + { + "Sequence": 0, + "Steps": [ + { + "DataId": 1052185, + "Position": { + "X": -4.837158, + "Y": -3.632158E-08, + "Z": 5.996765 + }, + "TerritoryId": 1207, + "InteractionType": "AcceptQuest" + } + ] + }, + { + "Sequence": 1, + "Steps": [ + { + "DataId": 2014102, + "Position": { + "X": -0.015319824, + "Y": 0.99176025, + "Z": 16.03717 + }, + "TerritoryId": 1207, + "InteractionType": "Interact", + "TargetTerritoryId": 1186, + "SkipConditions": { + "StepIf": { + "InTerritory": [ + 1186 + ] + } + } + }, + { + "DataId": 1052191, + "Position": { + "X": 20.248657, + "Y": 38.0566, + "Z": -388.90674 + }, + "TerritoryId": 1186, + "InteractionType": "Interact", + "AethernetShortcut": [ + "[Solution Nine] Neon Stein", + "[Solution Nine] Resolution" + ] + } + ] + }, + { + "Sequence": 255, + "Steps": [ + { + "DataId": 1052198, + "Position": { + "X": -303.2426, + "Y": 9.519508, + "Z": 51.80432 + }, + "StopDistance": 5, + "TerritoryId": 1186, + "InteractionType": "CompleteQuest" + } + ] + } + ] +} diff --git a/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5246_In Search of the Past.json b/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5246_In Search of the Past.json new file mode 100644 index 00000000..6d0878d1 --- /dev/null +++ b/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5246_In Search of the Past.json @@ -0,0 +1,146 @@ +{ + "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", + "Author": "liza", + "QuestSequence": [ + { + "Sequence": 0, + "Steps": [ + { + "DataId": 1052202, + "Position": { + "X": -305.83655, + "Y": 9.519508, + "Z": 53.147095 + }, + "StopDistance": 5, + "TerritoryId": 1186, + "InteractionType": "AcceptQuest" + } + ] + }, + { + "Sequence": 1, + "Steps": [ + { + "DataId": 1052205, + "Position": { + "X": -257.0382, + "Y": 30, + "Z": -569.05475 + }, + "TerritoryId": 1191, + "InteractionType": "Interact", + "AetheryteShortcut": "Heritage Found - The Outskirts" + }, + { + "DataId": 1052204, + "Position": { + "X": -158.25134, + "Y": 25.984516, + "Z": -521.90436 + }, + "TerritoryId": 1191, + "InteractionType": "Interact", + "Fly": true + }, + { + "DataId": 1052206, + "Position": { + "X": -137.86536, + "Y": 35, + "Z": -568.29175 + }, + "TerritoryId": 1191, + "InteractionType": "Interact", + "Fly": true + } + ] + }, + { + "Sequence": 2, + "Steps": [ + { + "DataId": 1048083, + "Position": { + "X": 302.05237, + "Y": 51.199978, + "Z": 205.0354 + }, + "TerritoryId": 1186, + "InteractionType": "Interact", + "AetheryteShortcut": "Solution Nine", + "AethernetShortcut": [ + "[Solution Nine] Aetheryte Plaza", + "[Solution Nine] Neon Stein" + ], + "TargetTerritoryId": 1207, + "SkipConditions": { + "AetheryteShortcutIf": { + "InTerritory": [ + 1207 + ] + }, + "StepIf": { + "InTerritory": [ + 1207 + ] + } + } + }, + { + "DataId": 1048161, + "Position": { + "X": -5.874817, + "Y": -3.6188258E-08, + "Z": 6.8512573 + }, + "TerritoryId": 1207, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 3, + "Steps": [ + { + "DataId": 1052207, + "Position": { + "X": -609.3385, + "Y": -3.3580189, + "Z": -504.5701 + }, + "TerritoryId": 1191, + "InteractionType": "Interact", + "AetheryteShortcut": "Heritage Found - The Outskirts", + "Fly": true + } + ] + }, + { + "Sequence": 4, + "Steps": [ + { + "TerritoryId": 1191, + "InteractionType": "Duty", + "ContentFinderConditionId": 1008 + } + ] + }, + { + "Sequence": 255, + "Steps": [ + { + "DataId": 1052213, + "Position": { + "X": 117.02136, + "Y": 12.5, + "Z": -67.826416 + }, + "StopDistance": 6, + "TerritoryId": 1254, + "InteractionType": "CompleteQuest" + } + ] + } + ] +} diff --git a/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5247_Among the Abandoned.json b/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5247_Among the Abandoned.json new file mode 100644 index 00000000..3ba25e86 --- /dev/null +++ b/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5247_Among the Abandoned.json @@ -0,0 +1,126 @@ +{ + "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", + "Author": "liza", + "QuestSequence": [ + { + "Sequence": 0, + "Steps": [ + { + "DataId": 1052217, + "Position": { + "X": 118.242065, + "Y": 12.5, + "Z": -69.0166 + }, + "StopDistance": 6, + "TerritoryId": 1254, + "InteractionType": "AcceptQuest" + } + ] + }, + { + "Sequence": 1, + "Steps": [ + { + "DataId": 2014471, + "Position": { + "X": 39.32251, + "Y": 13.260071, + "Z": 51.865356 + }, + "TerritoryId": 1254, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 2, + "Steps": [ + { + "DataId": 2014472, + "Position": { + "X": 101.8844, + "Y": 12.588623, + "Z": 130.44934 + }, + "TerritoryId": 1254, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 3, + "Steps": [ + { + "DataId": 2014473, + "Position": { + "X": 39.597046, + "Y": 13.260071, + "Z": 53.45227 + }, + "TerritoryId": 1254, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 4, + "Steps": [ + { + "DataId": 1052227, + "Position": { + "X": -581.2009, + "Y": -1.7638817, + "Z": -505.45514 + }, + "StopDistance": 5, + "TerritoryId": 1191, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 255, + "Steps": [ + { + "DataId": 1048083, + "Position": { + "X": 302.05237, + "Y": 51.199978, + "Z": 205.0354 + }, + "TerritoryId": 1186, + "InteractionType": "Interact", + "AetheryteShortcut": "Solution Nine", + "AethernetShortcut": [ + "[Solution Nine] Aetheryte Plaza", + "[Solution Nine] Neon Stein" + ], + "TargetTerritoryId": 1207, + "SkipConditions": { + "AetheryteShortcutIf": { + "InTerritory": [ + 1207 + ] + }, + "StepIf": { + "InTerritory": [ + 1207 + ] + } + } + }, + { + "DataId": 1048161, + "Position": { + "X": -5.874817, + "Y": -3.6188258E-08, + "Z": 6.8512573 + }, + "TerritoryId": 1207, + "InteractionType": "CompleteQuest" + } + ] + } + ] +} diff --git a/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5248_Guidance of the Hhetso.json b/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5248_Guidance of the Hhetso.json new file mode 100644 index 00000000..42f785b4 --- /dev/null +++ b/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5248_Guidance of the Hhetso.json @@ -0,0 +1,202 @@ +{ + "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", + "Author": "liza", + "QuestSequence": [ + { + "Sequence": 0, + "Steps": [ + { + "DataId": 1052233, + "Position": { + "X": -0.80877686, + "Y": -4.1909516E-08, + "Z": 6.42395 + }, + "StopDistance": 5, + "TerritoryId": 1207, + "InteractionType": "AcceptQuest" + } + ] + }, + { + "Sequence": 1, + "Steps": [ + { + "Position": { + "X": -363.22934, + "Y": 20.162338, + "Z": -90.19407 + }, + "TerritoryId": 1190, + "InteractionType": "WalkTo", + "AetheryteShortcut": "Shaaloani - Sheshenewezi Springs" + }, + { + "DataId": 1051495, + "Position": { + "X": -365.28577, + "Y": 20.14268, + "Z": -88.51758 + }, + "StopDistance": 5, + "TerritoryId": 1190, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 2, + "Steps": [ + { + "Position": { + "X": 302.1455, + "Y": -15.629961, + "Z": -516.2348 + }, + "TerritoryId": 1190, + "InteractionType": "WalkTo", + "AetheryteShortcut": "Shaaloani - Mehwahhetsoan", + "Fly": true + }, + { + "DataId": 1046988, + "Position": { + "X": 302.96777, + "Y": -15.629961, + "Z": -514.6716 + }, + "TerritoryId": 1190, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 3, + "Steps": [ + { + "DataId": 1051013, + "Position": { + "X": 303.79175, + "Y": -15.629962, + "Z": -516.25854 + }, + "TerritoryId": 1190, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 4, + "Steps": [ + { + "DataId": 1052247, + "Position": { + "X": 224.96375, + "Y": -16.329428, + "Z": -527.6417 + }, + "TerritoryId": 1190, + "InteractionType": "Interact", + "Fly": true, + "DialogueChoices": [ + { + "Type": "List", + "Prompt": "TEXT_KINGMG105_05248_Q2_000_000", + "Answer": "TEXT_KINGMG105_05248_A2_000_002" + } + ], + "CompletionQuestVariablesFlags": [ + null, + null, + null, + null, + null, + 16 + ] + }, + { + "DataId": 1052245, + "Position": { + "X": 276.78333, + "Y": -16.53927, + "Z": -562.7985 + }, + "TerritoryId": 1190, + "InteractionType": "Interact", + "Fly": true, + "CompletionQuestVariablesFlags": [ + null, + null, + null, + null, + null, + 32 + ] + }, + { + "DataId": 1052243, + "Position": { + "X": 332.26514, + "Y": -14.986355, + "Z": -558.95325 + }, + "TerritoryId": 1190, + "InteractionType": "Interact", + "Fly": true, + "CompletionQuestVariablesFlags": [ + null, + null, + null, + null, + null, + 128 + ] + }, + { + "DataId": 1052239, + "Position": { + "X": 354.57385, + "Y": -17.082237, + "Z": -452.5063 + }, + "TerritoryId": 1190, + "InteractionType": "Interact", + "Fly": true, + "CompletionQuestVariablesFlags": [ + null, + null, + null, + null, + null, + 64 + ] + } + ] + }, + { + "Sequence": 255, + "Steps": [ + { + "Position": { + "X": 302.1455, + "Y": -15.629961, + "Z": -516.2348 + }, + "TerritoryId": 1190, + "InteractionType": "WalkTo", + "Fly": true + }, + { + "DataId": 1051013, + "Position": { + "X": 303.79175, + "Y": -15.629962, + "Z": -516.25854 + }, + "TerritoryId": 1190, + "InteractionType": "CompleteQuest" + } + ] + } + ] +} diff --git a/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5249_The Warmth of Family.json b/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5249_The Warmth of Family.json new file mode 100644 index 00000000..7bbf6b74 --- /dev/null +++ b/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5249_The Warmth of Family.json @@ -0,0 +1,94 @@ +{ + "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", + "Author": "liza", + "QuestSequence": [ + { + "Sequence": 0, + "Steps": [ + { + "DataId": 1052248, + "Position": { + "X": 293.93445, + "Y": -16.71379, + "Z": -528.70984 + }, + "TerritoryId": 1190, + "InteractionType": "AcceptQuest" + } + ] + }, + { + "Sequence": 1, + "Steps": [ + { + "DataId": 1052248, + "Position": { + "X": 293.93445, + "Y": -16.71379, + "Z": -528.70984 + }, + "TerritoryId": 1190, + "InteractionType": "SinglePlayerDuty" + } + ] + }, + { + "Sequence": 2, + "Steps": [] + }, + { + "Sequence": 3, + "Steps": [ + { + "DataId": 1052252, + "Position": { + "X": 299.15308, + "Y": -15.629961, + "Z": -518.4253 + }, + "StopDistance": 5, + "TerritoryId": 1190, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 4, + "Steps": [ + { + "DataId": 1052255, + "Position": { + "X": -123.91852, + "Y": 16.187744, + "Z": -296.80328 + }, + "TerritoryId": 1190, + "InteractionType": "Interact", + "Fly": true, + "DialogueChoices": [ + { + "Type": "YesNo", + "Prompt": "TEXT_KINGMG106_05249_SYSTEM_000_402", + "Yes": true + } + ] + } + ] + }, + { + "Sequence": 255, + "Steps": [ + { + "DataId": 1052259, + "Position": { + "X": -171.03839, + "Y": 15.75679, + "Z": -372.45752 + }, + "TerritoryId": 1190, + "InteractionType": "CompleteQuest" + } + ] + } + ] +} diff --git a/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5250_Crossroads.json b/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5250_Crossroads.json new file mode 100644 index 00000000..1a853e69 --- /dev/null +++ b/QuestPaths/7.x - Dawntrail/MSQ/G-7.1/5250_Crossroads.json @@ -0,0 +1,126 @@ +{ + "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", + "Author": "liza", + "QuestSequence": [ + { + "Sequence": 0, + "Steps": [ + { + "DataId": 1052261, + "Position": { + "X": -172.25916, + "Y": 15.73959, + "Z": -376.1197 + }, + "TerritoryId": 1190, + "InteractionType": "AcceptQuest" + } + ] + }, + { + "Sequence": 1, + "Steps": [ + { + "DataId": 1048083, + "Position": { + "X": 302.05237, + "Y": 51.199978, + "Z": 205.0354 + }, + "TerritoryId": 1186, + "InteractionType": "Interact", + "AetheryteShortcut": "Solution Nine", + "AethernetShortcut": [ + "[Solution Nine] Aetheryte Plaza", + "[Solution Nine] Neon Stein" + ], + "TargetTerritoryId": 1207, + "SkipConditions": { + "AetheryteShortcutIf": { + "InTerritory": [ + 1207 + ] + }, + "StepIf": { + "InTerritory": [ + 1207 + ] + } + } + }, + { + "DataId": 1052521, + "Position": { + "X": -1.8463745, + "Y": -3.4458935E-08, + "Z": 5.8441772 + }, + "TerritoryId": 1207, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 2, + "Steps": [ + { + "DataId": 1052269, + "Position": { + "X": -2.456726, + "Y": -7.2107476E-08, + "Z": 8.987488 + }, + "TerritoryId": 1207, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 3, + "Steps": [ + { + "DataId": 1052271, + "Position": { + "X": -0.41204834, + "Y": -3.9115548E-08, + "Z": 6.240906 + }, + "TerritoryId": 1207, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 4, + "Steps": [ + { + "DataId": 1052272, + "Position": { + "X": 0.19836426, + "Y": 0.00054359436, + "Z": -94.98743 + }, + "TerritoryId": 1186, + "InteractionType": "Interact", + "AetheryteShortcut": "Solution Nine" + } + ] + }, + { + "Sequence": 255, + "Steps": [ + { + "DataId": 1052267, + "Position": { + "X": -3.7080078, + "Y": -7.4505806E-08, + "Z": 9.170593 + }, + "StopDistance": 7, + "TerritoryId": 1207, + "InteractionType": "CompleteQuest" + } + ] + } + ] +} diff --git a/QuestPaths/7.x - Dawntrail/Unlocks/Misc/5004_How the West Was Sung.json b/QuestPaths/7.x - Dawntrail/Unlocks/Misc/5004_How the West Was Sung.json new file mode 100644 index 00000000..bec00ecc --- /dev/null +++ b/QuestPaths/7.x - Dawntrail/Unlocks/Misc/5004_How the West Was Sung.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", + "Author": "liza", + "QuestSequence": [ + { + "Sequence": 0, + "Steps": [ + { + "DataId": 1048548, + "Position": { + "X": -109.48352, + "Y": -15, + "Z": 185.04602 + }, + "TerritoryId": 1185, + "InteractionType": "AcceptQuest" + } + ] + } + ] +} diff --git a/Questionable/Data/JournalData.cs b/Questionable/Data/JournalData.cs index f26f452a..56a12b6b 100644 --- a/Questionable/Data/JournalData.cs +++ b/Questionable/Data/JournalData.cs @@ -2,7 +2,6 @@ using System.Linq; using Dalamud.Plugin.Services; using Lumina.Excel.Sheets; -using Microsoft.Extensions.Logging; using Questionable.Model; using Questionable.Model.Questing; @@ -10,20 +9,12 @@ namespace Questionable.Data; internal sealed class JournalData { - public JournalData(IDataManager dataManager, QuestData questData, ILogger logger) + public JournalData(IDataManager dataManager, QuestData questData) { var genres = dataManager.GetExcelSheet() .Where(x => x.RowId > 0 && x.Icon > 0) .Select(x => new Genre(x, questData.GetAllByJournalGenre(x.RowId))) .ToList(); - foreach (var genre in genres) - { - logger.LogInformation("Genre {GenreId}: {GenreName} has {QuestCount} quests", - genre.Id, genre.Name, genre.QuestCount); - } - logger.LogInformation("Genre count: {GenreCount}", genres.Count); - var quest = questData.GetQuestInfo(new QuestId(5193)); - logger.LogInformation("Q: {N}, {A}, {B}", quest.Name, quest.JournalGenre, quest.IssuerDataId); var limsaStart = dataManager.GetExcelSheet().GetRow(1); var gridaniaStart = dataManager.GetExcelSheet().GetRow(2); diff --git a/Questionable/Data/Sheets/QuestEx.cs b/Questionable/Data/Sheets/QuestEx.cs index c4da0178..2dc47b8e 100644 --- a/Questionable/Data/Sheets/QuestEx.cs +++ b/Questionable/Data/Sheets/QuestEx.cs @@ -12,6 +12,7 @@ public readonly unsafe struct QuestEx(ExcelPage page, uint offset, uint row) : I public Quest Original { get; } = new(page, offset, row); + public readonly ReadOnlySeString Id => page.ReadString(offset + 2420, offset); public RowRef IssuerStart => RowRef.GetFirstValidRowOrUntyped(page.Module, page.ReadUInt32(offset + 2456), [typeof(EObjName), typeof(ENpcResident)], 882056187, page.Language); public RowRef IssuerLocation => new(page.Module, page.ReadUInt32(offset + 2460), page.Language); public RowRef JournalGenre => new(page.Module, page.ReadUInt32(offset + 2468), page.Language); diff --git a/Questionable/Functions/ExcelFunctions.cs b/Questionable/Functions/ExcelFunctions.cs index 2043c5a6..3109f942 100644 --- a/Questionable/Functions/ExcelFunctions.cs +++ b/Questionable/Functions/ExcelFunctions.cs @@ -3,10 +3,13 @@ using System.Linq; using Dalamud.Plugin.Services; using Dalamud.Utility; using LLib; +using Lumina.Excel; +using Lumina.Excel.Exceptions; using Lumina.Excel.Sheets; using Lumina.Text; using Lumina.Text.ReadOnly; using Microsoft.Extensions.Logging; +using Questionable.Data.Sheets; using Questionable.Model; using Quest = Questionable.Model.Quest; using GimmickYesNo = Lumina.Excel.Sheets.GimmickYesNo; @@ -38,7 +41,7 @@ internal sealed class ExcelFunctions if (currentQuest != null && excelSheetName == null) { var questRow = - _dataManager.GetExcelSheet().GetRowOrDefault((uint)currentQuest.Id.Value + + _dataManager.GetExcelSheet().GetRowOrDefault((uint)currentQuest.Id.Value + 0x10000); if (questRow == null) { @@ -46,13 +49,20 @@ internal sealed class ExcelFunctions return null; } - excelSheetName = $"quest/{(currentQuest.Id.Value / 100):000}/{questRow.Value.RowId}"; + excelSheetName = $"quest/{(currentQuest.Id.Value / 100):000}/{questRow.Value.Id}"; } ArgumentNullException.ThrowIfNull(excelSheetName); - var excelSheet = _dataManager.GetExcelSheet(name: excelSheetName); - return excelSheet.Cast() - .FirstOrDefault(x => x!.Value.Key == key)?.Value; + try + { + var excelSheet = _dataManager.GetExcelSheet(name: excelSheetName); + return excelSheet.Cast() + .FirstOrDefault(x => x!.Value.Key == key)?.Value; + } + catch (SheetNotFoundException e) + { + throw new SheetNotFoundException($"Sheet '{excelSheetName}' not found", e); + } } public StringOrRegex GetDialogueTextByRowId(string? excelSheet, uint rowId, bool isRegex) diff --git a/Questionable/Functions/GameFunctions.cs b/Questionable/Functions/GameFunctions.cs index d4a7e692..c20f3d48 100644 --- a/Questionable/Functions/GameFunctions.cs +++ b/Questionable/Functions/GameFunctions.cs @@ -64,10 +64,9 @@ internal sealed unsafe class GameFunctions _territoryToAetherCurrentCompFlgSet = dataManager.GetExcelSheet() .Where(x => x.RowId > 0) - .Where(x => x.Unknown3 > 0) + .Where(x => x.Unknown4 > 0) .ToDictionary(x => (ushort)x.RowId, x => x.Unknown4) .AsReadOnly(); - _territoryToAetherCurrentCompFlgSet = new Dictionary().AsReadOnly(); _contentFinderConditionToContentId = dataManager.GetExcelSheet() .Where(x => x.RowId > 0 && x.Content.RowId > 0) .ToDictionary(x => x.RowId, x => x.Content.RowId)