Fix wrong command condition
authorLiza Carvelli <liza@carvel.li>
Wed, 17 Jul 2024 19:42:49 +0000 (21:42 +0200)
committerLiza Carvelli <liza@carvel.li>
Wed, 17 Jul 2024 19:42:49 +0000 (21:42 +0200)
QuestPaths/2.x - A Realm Reborn/MSQ-1/Shared/680_The Company You Keep (Twin Adders).json
Questionable/Controller/CommandHandler.cs

index b3411d73fd0c6bc924908f288817470e22f2ce2e..0b4ee30c6375c4ed672bef83df2c230d5731b58a 100644 (file)
             "[Gridania] Lancers' Guild"
           ]
         },
+        {
+          "TerritoryId": 152,
+          "InteractionType": "AttuneAetheryte",
+          "Aetheryte": "East Shroud - Hawthorne Hut"
+        },
         {
           "DataId": 1004886,
           "Position": {
index e7fa9767fc6c79c2432968b52ffa26d7caa5ae5e..160310bf3f1ba43c223b608179f728d8efb13732 100644 (file)
@@ -101,9 +101,7 @@ internal sealed class CommandHandler : IDisposable
 
         if (arguments.Length >= 1 && ushort.TryParse(arguments[0], out ushort questId))
         {
-            if (_gameFunctions.IsQuestLocked(questId, 0))
-                _chatGui.PrintError($"[Questionable] Quest {questId} is locked.");
-            else if (_questRegistry.TryGetQuest(questId, out Quest? quest))
+            if (_questRegistry.TryGetQuest(questId, out Quest? quest))
             {
                 _debugOverlay.HighlightedQuest = questId;
                 _chatGui.Print($"[Questionable] Set highlighted quest to {questId} ({quest.Info.Name}).");
@@ -122,7 +120,9 @@ internal sealed class CommandHandler : IDisposable
     {
         if (arguments.Length >= 1 && ushort.TryParse(arguments[0], out ushort questId))
         {
-            if (_questRegistry.TryGetQuest(questId, out Quest? quest))
+            if (_gameFunctions.IsQuestLocked(questId, 0))
+                _chatGui.PrintError($"[Questionable] Quest {questId} is locked.");
+            else if (_questRegistry.TryGetQuest(questId, out Quest? quest))
             {
                 _questController.SetNextQuest(quest);
                 _chatGui.Print($"[Questionable] Set next quest to {questId} ({quest.Info.Name}).");