From 4ccd615832b6a6c195fb6a62317f2ae1e3ed9efc Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Tue, 1 Oct 2024 22:05:21 +0200 Subject: [PATCH] Fix 'NotInInventory' ignoring HQ items --- .../Class Quests/SGE/4068_Sage's Focus.json | 14 +------------- .../Controller/Steps/Interactions/EquipItem.cs | 2 ++ .../Controller/Steps/Shared/SkipCondition.cs | 3 ++- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/QuestPaths/6.x - Endwalker/Class Quests/SGE/4068_Sage's Focus.json b/QuestPaths/6.x - Endwalker/Class Quests/SGE/4068_Sage's Focus.json index 5c731ab8..18fbc7da 100644 --- a/QuestPaths/6.x - Endwalker/Class Quests/SGE/4068_Sage's Focus.json +++ b/QuestPaths/6.x - Endwalker/Class Quests/SGE/4068_Sage's Focus.json @@ -33,13 +33,8 @@ "TerritoryId": 134, "InteractionType": "EquipItem", "ItemId": 35778, - "AetheryteShortcut": "Middle La Noscea - Summerford Farms", - "Fly": true, "Comment": "Try to Equip Stonegold Milpreves", "SkipConditions": { - "AetheryteShortcutIf": { - "InSameTerritory": true - }, "StepIf": { "Item": { "NotInInventory": true @@ -60,14 +55,7 @@ }, "StopDistance": 5, "TerritoryId": 134, - "InteractionType": "AcceptQuest", - "AetheryteShortcut": "Middle La Noscea - Summerford Farms", - "Fly": true, - "SkipConditions": { - "AetheryteShortcutIf": { - "InSameTerritory": true - } - } + "InteractionType": "AcceptQuest" } ] }, diff --git a/Questionable/Controller/Steps/Interactions/EquipItem.cs b/Questionable/Controller/Steps/Interactions/EquipItem.cs index 9e424f65..c8159247 100644 --- a/Questionable/Controller/Steps/Interactions/EquipItem.cs +++ b/Questionable/Controller/Steps/Interactions/EquipItem.cs @@ -158,6 +158,8 @@ internal static class EquipItem return; } } + + throw new TaskException($"Could not equip item {Task.ItemId}."); } private static List? GetEquipSlot(Item item) diff --git a/Questionable/Controller/Steps/Shared/SkipCondition.cs b/Questionable/Controller/Steps/Shared/SkipCondition.cs index 9690d474..c95ee8ea 100644 --- a/Questionable/Controller/Steps/Shared/SkipCondition.cs +++ b/Questionable/Controller/Steps/Shared/SkipCondition.cs @@ -144,7 +144,8 @@ internal static class SkipCondition if (skipConditions.Item is { NotInInventory: true } && step is { ItemId: not null }) { InventoryManager* inventoryManager = InventoryManager.Instance(); - if (inventoryManager->GetInventoryItemCount(step.ItemId.Value) == 0) + if (inventoryManager->GetInventoryItemCount(step.ItemId.Value) == 0 && + inventoryManager->GetInventoryItemCount(step.ItemId.Value, true) == 0) { logger.LogInformation("Skipping step, no item with itemId {ItemId} in inventory", step.ItemId.Value);