Updates to Gridania/Limsa start
authorLiza Carvelli <liza@carvel.li>
Thu, 28 Nov 2024 22:28:30 +0000 (23:28 +0100)
committerLiza Carvelli <liza@carvel.li>
Thu, 28 Nov 2024 22:28:30 +0000 (23:28 +0100)
13 files changed:
QuestPaths/2.x - A Realm Reborn/MSQ-1/Gridania/129_Spirithold Broken.json
QuestPaths/2.x - A Realm Reborn/MSQ-1/Gridania/175_Surveying the Damage.json
QuestPaths/2.x - A Realm Reborn/MSQ-1/Gridania/201_Passing Muster.json
QuestPaths/2.x - A Realm Reborn/MSQ-1/Gridania/3855_A Soldier's Breakfast.json
QuestPaths/2.x - A Realm Reborn/MSQ-1/Limsa/463_Dressed to Call.json
QuestPaths/quest-v1.json
Questionable.Model/Questing/Converter/EnemySpawnTypeConverter.cs
Questionable.Model/Questing/EEnemySpawnType.cs
Questionable/Controller/CombatController.cs
Questionable/Controller/GameUi/InteractionUiController.cs
Questionable/Controller/Steps/Interactions/Combat.cs
Questionable/Controller/Steps/QuestCleanUp.cs
Questionable/Functions/QuestFunctions.cs

index 8c7b51e1039290ae368511ae320b35611b2bebd0..cdb594ab56b88ae3f74ced4c18a235f1083b7f8e 100644 (file)
     {
       "Sequence": 2,
       "Steps": [
-        {
-          "DataId": 1000465,
-          "Position": {
-            "X": 298.63428,
-            "Y": 9.999997,
-            "Z": 119.035645
-          },
-          "TerritoryId": 148,
-          "InteractionType": "WaitForManualProgress",
-          "Comment": "Manual Quest Progress (very combat heavy)",
-          "$": "TODO Remove later"
-        },
         {
           "DataId": 1000512,
           "Position": {
@@ -56,7 +44,6 @@
           },
           "TerritoryId": 148,
           "InteractionType": "Interact",
-          "Disabled": true,
           "CompletionQuestVariablesFlags": [
             null,
             null,
@@ -75,7 +62,6 @@
           },
           "TerritoryId": 148,
           "InteractionType": "Interact",
-          "Disabled": true,
           "CompletionQuestVariablesFlags": [
             null,
             null,
@@ -94,7 +80,6 @@
           },
           "TerritoryId": 148,
           "InteractionType": "Interact",
-          "Disabled": true,
           "CompletionQuestVariablesFlags": [
             null,
             null,
           },
           "TerritoryId": 148,
           "InteractionType": "Interact",
-          "Disabled": true,
           "CompletionQuestVariablesFlags": [
             null,
             null,
           },
           "TerritoryId": 148,
           "InteractionType": "Interact",
-          "Disabled": true,
           "CompletionQuestVariablesFlags": [
             null,
             null,
index e62a1b0c8218e557fda0ce6662f87003d71922f1..a254f6209602b304251123a0720e901c5a49abaa 100644 (file)
       "Sequence": 1,
       "Comment": "Very likely this needs manual combat and/or manual continues",
       "Steps": [
+        {
+          "Position": {
+            "X": 192.07129,
+            "Y": -12.000001,
+            "Z": 38.204
+          },
+          "TerritoryId": 148,
+          "InteractionType": "WalkTo"
+        },
+        {
+          "Position": {
+            "X": 190.28528,
+            "Y": -12,
+            "Z": 77.53861
+          },
+          "TerritoryId": 148,
+          "InteractionType": "Combat",
+          "EnemySpawnType": "FinishCombatIfAny",
+          "KillEnemyDataIds": []
+        },
         {
           "DataId": 2000141,
           "Position": {
index d9a568be2c985909cfe4f51856bf78a57cf44cc5..266df28e56d017f23976468d958cd1d286d773bb 100644 (file)
           "TerritoryId": 148,
           "InteractionType": "EquipRecommended"
         },
+        {
+          "DataId": 1000396,
+          "Position": {
+            "X": 82.597046,
+            "Y": -7.893894,
+            "Z": -103.349365
+          },
+          "TerritoryId": 148,
+          "InteractionType": "PurchaseItem",
+          "PurchaseMenu": {
+            "ExcelSheet": "GilShop",
+            "Key": 262186
+          },
+          "ItemId": 2653,
+          "ItemCount": 1,
+          "RequiredCurrentJob": [
+            "DoW"
+          ],
+          "SkipConditions": {
+            "StepIf": {
+              "Item": {
+                "NotInInventory": false
+              }
+            }
+          }
+        },
+        {
+          "DataId": 1000396,
+          "Position": {
+            "X": 82.597046,
+            "Y": -7.893894,
+            "Z": -103.349365
+          },
+          "TerritoryId": 148,
+          "InteractionType": "PurchaseItem",
+          "PurchaseMenu": {
+            "ExcelSheet": "GilShop",
+            "Key": 262186
+          },
+          "ItemId": 2655,
+          "ItemCount": 1,
+          "RequiredCurrentJob": [
+            "DoM"
+          ]
+        },
+        {
+          "TerritoryId": 148,
+          "InteractionType": "EquipItem",
+          "ItemId": 2653,
+          "SkipConditions": {
+            "StepIf": {
+              "Item": {
+                "NotInInventory": true
+              }
+            }
+          }
+        },
+        {
+          "TerritoryId": 148,
+          "InteractionType": "EquipItem",
+          "ItemId": 2655,
+          "SkipConditions": {
+            "StepIf": {
+              "Item": {
+                "NotInInventory": true
+              }
+            }
+          }
+        },
         {
           "DataId": 1000421,
           "Position": {
index 64af3a3487942196be9c3d8e86ac375b19b4ba1e..dd2e59d16de24c6a37102111abdb5b59397d3a80 100644 (file)
     {
       "Sequence": 1,
       "Steps": [
+        {
+          "Position": {
+            "X": 486.40424,
+            "Y": 24.968294,
+            "Z": -88.684456
+          },
+          "TerritoryId": 148,
+          "InteractionType": "Combat",
+          "EnemySpawnType": "FinishCombatIfAny",
+          "KillEnemyDataIds": []
+        },
         {
           "DataId": 2000010,
           "Position": {
index 2911b4e9a251abc288efbc8e89679f9a702a11df..db9debe78b07bbdb89509cf8b468193758bb3d0c 100644 (file)
           "TerritoryId": 134,
           "InteractionType": "EquipRecommended"
         },
+        {
+          "DataId": 1003257,
+          "Position": {
+            "X": 201.70898,
+            "Y": 98.422874,
+            "Z": -206.10364
+          },
+          "TerritoryId": 134,
+          "InteractionType": "PurchaseItem",
+          "PurchaseMenu": {
+            "ExcelSheet": "GilShop",
+            "Key": 262186
+          },
+          "ItemId": 2653,
+          "ItemCount": 1,
+          "RequiredCurrentJob": [
+            "DoW"
+          ],
+          "SkipConditions": {
+            "StepIf": {
+              "Item": {
+                "NotInInventory": false
+              }
+            }
+          }
+        },
+        {
+          "DataId": 1003257,
+          "Position": {
+            "X": 201.70898,
+            "Y": 98.422874,
+            "Z": -206.10364
+          },
+          "TerritoryId": 134,
+          "InteractionType": "PurchaseItem",
+          "PurchaseMenu": {
+            "ExcelSheet": "GilShop",
+            "Key": 262186
+          },
+          "ItemId": 2655,
+          "ItemCount": 1,
+          "RequiredCurrentJob": [
+            "DoM"
+          ]
+        },
+        {
+          "TerritoryId": 134,
+          "InteractionType": "EquipItem",
+          "ItemId": 2653,
+          "SkipConditions": {
+            "StepIf": {
+              "Item": {
+                "NotInInventory": true
+              }
+            }
+          }
+        },
+        {
+          "TerritoryId": 134,
+          "InteractionType": "EquipItem",
+          "ItemId": 2655,
+          "SkipConditions": {
+            "StepIf": {
+              "Item": {
+                "NotInInventory": true
+              }
+            }
+          }
+        },
         {
           "DataId": 1002626,
           "Position": {
index 134b1c60d9278f4cee006a1167c08560d327e8f8..7511bc270660dd92dbdfe9ac6e011dfcd18b5dc9 100644 (file)
                   "AfterAction",
                   "AfterEmote",
                   "OverworldEnemies",
-                  "FateEnemies"
+                  "FateEnemies",
+                  "FinishCombatIfAny"
                 ]
               },
               "KillEnemyDataIds": {
index 1b43eaf43ae6592a706896dcf44df546f5523f4c..58b292f35f3fbb836134bf641b64332ef45dc4af 100644 (file)
@@ -14,5 +14,6 @@ public sealed class EnemySpawnTypeConverter() : EnumConverter<EEnemySpawnType>(V
         { EEnemySpawnType.AutoOnEnterArea, "AutoOnEnterArea" },
         { EEnemySpawnType.OverworldEnemies, "OverworldEnemies" },
         { EEnemySpawnType.FateEnemies, "FateEnemies" },
+        { EEnemySpawnType.FinishCombatIfAny, "FinishCombatIfAny" }
     };
 }
index e4f49433f43ccec1757425cc1a9ce00e50d6983e..49f44bf1b00f1d3e8a6dd1af0f74ffab43127613 100644 (file)
@@ -14,5 +14,6 @@ public enum EEnemySpawnType
     AutoOnEnterArea,
     OverworldEnemies,
     FateEnemies,
+    FinishCombatIfAny,
     QuestInterruption,
 }
index 9cdf3bcf00e28a738d6ec4f49f56b6bca122534e..91eca6c1437b0bfa8e0942d390067b1c15ea6b4f 100644 (file)
@@ -76,7 +76,7 @@ internal sealed class CombatController : IDisposable
                 Module = combatModule,
                 Data = combatData,
             };
-            _wasInCombat = combatData.SpawnType == EEnemySpawnType.QuestInterruption;
+            _wasInCombat = combatData.SpawnType is EEnemySpawnType.QuestInterruption or EEnemySpawnType.FinishCombatIfAny;
             return true;
         }
         else
index 2014807393ab1492ccb41803425e5fe205de7d85..c5aa27c392c5e5cf14c6d55d904309e82b4e4e41 100644 (file)
@@ -51,6 +51,7 @@ internal sealed class InteractionUiController : IDisposable
     private readonly ShopController _shopController;
     private readonly ILogger<InteractionUiController> _logger;
     private readonly Regex _returnRegex;
+    private readonly Regex _purchaseItemRegex;
 
     private bool _isInitialCheck;
 
@@ -91,6 +92,7 @@ internal sealed class InteractionUiController : IDisposable
         _logger = logger;
 
         _returnRegex = _dataManager.GetExcelSheet<Addon>().GetRow(196).GetRegex(addon => addon.Text, pluginLog)!;
+        _purchaseItemRegex = _dataManager.GetRegex<Addon>(3406, addon => addon.Text, pluginLog)!;
 
         _addonLifecycle.RegisterListener(AddonEvent.PostSetup, "SelectString", SelectStringPostSetup);
         _addonLifecycle.RegisterListener(AddonEvent.PostSetup, "CutSceneSelectString", CutsceneSelectStringPostSetup);
@@ -560,7 +562,7 @@ internal sealed class InteractionUiController : IDisposable
             return;
 
         _logger.LogTrace("Prompt: '{Prompt}'", actualPrompt);
-        if (_shopController.IsAutoBuyEnabled && _shopController.IsAwaitingYesNo)
+        if (_shopController.IsAwaitingYesNo && _purchaseItemRegex.IsMatch(actualPrompt))
         {
             addonSelectYesno->AtkUnitBase.FireCallbackInt(0);
             _shopController.IsAwaitingYesNo = false;
index c670e3bca6f97cef8a076208a1954303f2de676c..f0b7ff15f6317a3fa20bd1c81414b7d82ab28bfc 100644 (file)
@@ -83,6 +83,7 @@ internal static class Combat
 
                 case EEnemySpawnType.OverworldEnemies:
                 case EEnemySpawnType.FateEnemies:
+                case EEnemySpawnType.FinishCombatIfAny:
                     yield return CreateTask(quest, sequence, step);
                     break;
 
@@ -122,17 +123,18 @@ internal static class Combat
     {
         public override string ToString()
         {
+            if (CombatData.SpawnType == EEnemySpawnType.FinishCombatIfAny)
+                return "HandleCombat(wait: not in combat, optional)";
             if (QuestWorkUtils.HasCompletionFlags(CompletionQuestVariableFlags))
-                return $"HandleCombat(wait: QW flags)";
+                return "HandleCombat(wait: QW flags)";
             else if (IsLastStep)
-                return $"HandleCombat(wait: next sequence)";
+                return "HandleCombat(wait: next sequence)";
             else
-                return $"HandleCombat(wait: not in combat)";
+                return "HandleCombat(wait: not in combat)";
         }
     }
 
     internal sealed class HandleCombat(
-
         CombatController combatController,
         QuestFunctions questFunctions) : TaskExecutor<Task>
     {
index b3cd5b50339a06be4532b5979575bf273d0855c0..e5e5605599d6c480294419fc82705d060a4c4405 100644 (file)
@@ -14,7 +14,8 @@ internal static class QuestCleanUp
 {
     private static readonly Dictionary<ushort, MountConfiguration> AlliedSocietyMountConfiguration = new()
     {
-        { 369, new(1051798, EAetheryteLocation.KozamaukaDockPoga) }
+        { 79, new(1017031, EAetheryteLocation.DravanianForelandsAnyxTrine) },
+        { 369, new(1051798, EAetheryteLocation.KozamaukaDockPoga) },
     };
 
     internal sealed class CheckAlliedSocietyMount(GameFunctions gameFunctions, AetheryteData aetheryteData, ILogger<CheckAlliedSocietyMount> logger) : SimpleTaskFactory
index 1ef56c4e42d3e59d2f4e451eed2a369900229a43..067e0e7794c8ae886c4881d7583edfa02baadeca 100644 (file)
@@ -243,6 +243,8 @@ internal sealed unsafe class QuestFunctions
         {
             return questId.Value switch
             {
+                >= 2171 and <= 2200 => EAlliedSociety.VanuVanu,
+                >= 2261 and <= 2280 => EAlliedSociety.Vath,
                 >= 5199 and <= 5226 => EAlliedSociety.Pelupelu,
                 _ => EAlliedSociety.None,
             };