1
0
forked from liza/Questionable

Daily quest updates

This commit is contained in:
Liza 2024-08-17 22:09:47 +02:00
parent f76e074cd8
commit 3210568ce9
Signed by: liza
GPG Key ID: 7199F8D727D55F67
21 changed files with 669 additions and 37 deletions

View File

@ -4,7 +4,8 @@
"Steps": [ "Steps": [
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "None" "InteractionType": "None",
"AetheryteShortcut": "Rak'tika - Slitherbough"
} }
], ],
"Groups": [ "Groups": [

View File

@ -0,0 +1,67 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/GatheringPaths/gatheringlocation-v1.json",
"Author": "liza",
"Steps": [
{
"TerritoryId": 817,
"InteractionType": "None",
"AetheryteShortcut": "Rak'tika - Slitherbough"
}
],
"Groups": [
{
"Nodes": [
{
"DataId": 33020,
"Locations": [
{
"Position": {
"X": 226.1767,
"Y": -20.10281,
"Z": 643.5543
},
"MinimumAngle": -50,
"MaximumAngle": 120
}
]
}
]
},
{
"Nodes": [
{
"DataId": 33018,
"Locations": [
{
"Position": {
"X": 248.9525,
"Y": -17.98949,
"Z": 657.4498
},
"MinimumAngle": -55,
"MaximumAngle": 100,
"MinimumDistance": 1,
"MaximumDistance": 3
}
]
}
]
},
{
"Nodes": [
{
"DataId": 33019,
"Locations": [
{
"Position": {
"X": 209.0277,
"Y": -25.56828,
"Z": 701.8604
}
}
]
}
]
}
]
}

View File

@ -138,6 +138,8 @@ internal static class SkipConditionsExtensions
Assignment(nameof(SkipAetheryteCondition.RequiredQuestVariablesNotMet), Assignment(nameof(SkipAetheryteCondition.RequiredQuestVariablesNotMet),
skipAetheryteCondition.RequiredQuestVariablesNotMet, skipAetheryteCondition.RequiredQuestVariablesNotMet,
emptyAetheryte.RequiredQuestVariablesNotMet) emptyAetheryte.RequiredQuestVariablesNotMet)
.AsSyntaxNodeOrToken())))); .AsSyntaxNodeOrToken(),
Assignment(nameof(skipAetheryteCondition.NearPosition), skipAetheryteCondition.NearPosition,
emptyAetheryte.NearPosition).AsSyntaxNodeOrToken()))));
} }
} }

View File

@ -1,7 +1,6 @@
{ {
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza", "Author": "liza",
"Disabled": true,
"QuestSequence": [ "QuestSequence": [
{ {
"Sequence": 0, "Sequence": 0,
@ -22,7 +21,111 @@
{ {
"Sequence": 1, "Sequence": 1,
"Steps": [ "Steps": [
{
"DataId": 2009325,
"Position": {
"X": -606.1647,
"Y": 53.238647,
"Z": 233.26453
},
"TerritoryId": 612,
"InteractionType": "UseItem",
"ItemId": 2002433,
"Fly": true,
"RequiredQuestVariables": [
null,
[
{
"Low": 2
},
{
"Low": 3
}
],
null,
null,
null,
null
],
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
},
{
"DataId": 2009326,
"Position": {
"X": -619.31793,
"Y": 45.181885,
"Z": 267.81104
},
"TerritoryId": 612,
"InteractionType": "UseItem",
"ItemId": 2002433,
"Fly": true,
"RequiredQuestVariables": [
null,
[
{
"Low": 1
},
{
"Low": 2
}
],
null,
null,
null,
null
],
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
},
{
"DataId": 2009324,
"Position": {
"X": -631.70825,
"Y": 44.785156,
"Z": 306.14172
},
"TerritoryId": 612,
"InteractionType": "UseItem",
"ItemId": 2002433,
"Fly": true,
"RequiredQuestVariables": [
null,
[
{
"Low": 1
},
{
"Low": 3
}
],
null,
null,
null,
null
],
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
}
] ]
}, },
{ {

View File

@ -0,0 +1,6 @@
```
0 xx 0 0 0 0 | 2009324 2009325 2009326
33 | x x
34 | x x
35 | x x
```

View File

@ -1,7 +1,6 @@
{ {
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza", "Author": "liza",
"Disabled": true,
"QuestSequence": [ "QuestSequence": [
{ {
"Sequence": 0, "Sequence": 0,
@ -30,8 +29,44 @@
{ {
"Sequence": 1, "Sequence": 1,
"Steps": [ "Steps": [
{
"DataId": 2011178,
"Position": {
"X": -267.5365,
"Y": 14.389221,
"Z": -191.63806
},
"TerritoryId": 813,
"InteractionType": "Interact",
"Fly": true,
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
},
{
"DataId": 2011177,
"Position": {
"X": -236.13336,
"Y": 21.042175,
"Z": -223.0412
},
"TerritoryId": 813,
"InteractionType": "Interact",
"Fly": true,
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
}
] ]
}, },
{ {

View File

@ -30,8 +30,37 @@
{ {
"Sequence": 1, "Sequence": 1,
"Steps": [ "Steps": [
{
"DataId": 1033767,
"Position": {
"X": -608.6061,
"Y": 65.60222,
"Z": -431.81506
},
"TerritoryId": 813,
"InteractionType": "Interact"
}
]
},
{
"Sequence": 2,
"Steps": [
{
"TerritoryId": 813,
"InteractionType": "Craft",
"ItemId": 31153,
"ItemCount": 3
},
{
"DataId": 1034112,
"Position": {
"X": 115.983765,
"Y": 106.73271,
"Z": -551.7815
},
"TerritoryId": 813,
"InteractionType": "Interact"
}
] ]
}, },
{ {
@ -45,6 +74,7 @@
}, },
"TerritoryId": 813, "TerritoryId": 813,
"InteractionType": "WalkTo", "InteractionType": "WalkTo",
"AetheryteShortcut": "Lakeland - Ostall Imperative",
"Fly": true "Fly": true
}, },
{ {

View File

@ -1,7 +1,6 @@
{ {
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza", "Author": "liza",
"Disabled": true,
"QuestSequence": [ "QuestSequence": [
{ {
"Sequence": 0, "Sequence": 0,

View File

@ -1,7 +1,6 @@
{ {
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza", "Author": "liza",
"Disabled": true,
"QuestSequence": [ "QuestSequence": [
{ {
"Sequence": 0, "Sequence": 0,
@ -32,9 +31,16 @@
"AetheryteShortcut": "Rak'tika - Fanow", "AetheryteShortcut": "Rak'tika - Fanow",
"Fly": true, "Fly": true,
"RequiredGatheredItems": [ "RequiredGatheredItems": [
{
"QuestAcceptedAsClass": "Miner",
"ItemId": 29520,
"ItemCount": 3
},
{
"QuestAcceptedAsClass": "Botanist",
"ItemId": 29546,
"ItemCount": 3
}
] ]
}, },
{ {

View File

@ -1,7 +1,6 @@
{ {
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza", "Author": "liza",
"Disabled": true,
"QuestSequence": [ "QuestSequence": [
{ {
"Sequence": 0, "Sequence": 0,
@ -18,6 +17,65 @@
} }
] ]
}, },
{
"Sequence": 1,
"Steps": [
{
"DataId": 2010995,
"Position": {
"X": -73.99103,
"Y": -19.36377,
"Z": 298.8479
},
"TerritoryId": 817,
"InteractionType": "UseItem",
"ItemId": 2002977,
"AetheryteShortcut": "Rak'tika - Slitherbough",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
},
{
"DataId": 2010994,
"Position": {
"X": -69.13867,
"Y": -19.485779,
"Z": 294.14807
},
"TerritoryId": 817,
"InteractionType": "UseItem",
"ItemId": 2002977,
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
}
]
},
{
"Sequence": 2,
"Steps": [
{
"DataId": 1027741,
"Position": {
"X": -80.338745,
"Y": -19.101032,
"Z": 299.82446
},
"TerritoryId": 817,
"InteractionType": "Interact"
}
]
},
{ {
"Sequence": 255, "Sequence": 255,
"Steps": [ "Steps": [

View File

@ -1,7 +1,6 @@
{ {
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza", "Author": "liza",
"Disabled": true,
"QuestSequence": [ "QuestSequence": [
{ {
"Sequence": 0, "Sequence": 0,
@ -30,6 +29,50 @@
{ {
"Sequence": 1, "Sequence": 1,
"Steps": [ "Steps": [
{
"DataId": 1044567,
"Position": {
"X": -17.502136,
"Y": -47.192066,
"Z": -528.03845
},
"TerritoryId": 959,
"InteractionType": "Interact",
"Fly": true
}
]
},
{
"Sequence": 2,
"Steps": [
{
"DataId": 1044568,
"Position": {
"X": -188.09796,
"Y": -49.14971,
"Z": -252.70471
},
"TerritoryId": 959,
"InteractionType": "Emote",
"Emote": "dance",
"Fly": true
}
]
},
{
"Sequence": 3,
"Steps": [
{
"DataId": 1044568,
"Position": {
"X": -188.09796,
"Y": -49.14971,
"Z": -252.70471
},
"TerritoryId": 959,
"InteractionType": "Emote",
"Emote": "dance"
}
] ]
}, },
{ {

View File

@ -30,6 +30,39 @@
{ {
"Sequence": 1, "Sequence": 1,
"Steps": [ "Steps": [
{
"DataId": 1044573,
"Position": {
"X": 487.23572,
"Y": -163.52985,
"Z": -600.5188
},
"TerritoryId": 959,
"InteractionType": "Interact",
"AetheryteShortcut": "Mare Lamentorum - Bestways Burrow",
"Fly": true
}
]
},
{
"Sequence": 2,
"Steps": [
{
"TerritoryId": 959,
"InteractionType": "Craft",
"ItemId": 38859,
"ItemCount": 3
},
{
"DataId": 1044573,
"Position": {
"X": 487.23572,
"Y": -163.52985,
"Z": -600.5188
},
"TerritoryId": 959,
"InteractionType": "Interact"
}
] ]
}, },
{ {
@ -42,7 +75,9 @@
"Z": -273.68756 "Z": -273.68756
}, },
"TerritoryId": 959, "TerritoryId": 959,
"InteractionType": "WalkTo" "InteractionType": "WalkTo",
"AetheryteShortcut": "Mare Lamentorum - Bestways Burrow",
"Fly": true
}, },
{ {
"DataId": 1044403, "DataId": 1044403,

View File

@ -1,7 +1,6 @@
{ {
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza", "Author": "liza",
"Disabled": true,
"QuestSequence": [ "QuestSequence": [
{ {
"Sequence": 0, "Sequence": 0,
@ -18,9 +17,151 @@
} }
] ]
}, },
{
"Sequence": 1,
"Steps": [
{
"DataId": 1044046,
"Position": {
"X": -585.3514,
"Y": 74.4431,
"Z": 238.33057
},
"StopDistance": 9,
"TerritoryId": 960,
"InteractionType": "Interact",
"AetheryteShortcut": "Ultima Thule - Reah Tahra",
"RequiredQuestVariables": [
null,
null,
[
{
"High": 1
},
{
"High": 3
}
],
null,
null,
null
],
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
],
"SkipConditions": {
"AetheryteShortcutIf": {
"RequiredQuestVariablesNotMet": true
}
}
},
{
"DataId": 1044047,
"Position": {
"X": 36.66736,
"Y": 269.16718,
"Z": -627.83246
},
"TerritoryId": 960,
"InteractionType": "Interact",
"AetheryteShortcut": "Ultima Thule - Abode of the Ea",
"RequiredQuestVariables": [
null,
null,
[
{
"High": 2
},
{
"High": 3
}
],
null,
null,
null
],
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
],
"SkipConditions": {
"AetheryteShortcutIf": {
"RequiredQuestVariablesNotMet": true
}
}
},
{
"DataId": 1044045,
"Position": {
"X": 510.64307,
"Y": 436.9999,
"Z": 332.41772
},
"TerritoryId": 960,
"InteractionType": "Interact",
"AetheryteShortcut": "Ultima Thule - Base Omicron",
"RequiredQuestVariables": [
null,
null,
[
{
"High": 1
},
{
"High": 2
}
],
null,
null,
null
],
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
}
]
},
{ {
"Sequence": 255, "Sequence": 255,
"Steps": [ "Steps": [
{
"DataId": 2013072,
"Position": {
"X": 456.65674,
"Y": 438.04077,
"Z": 310.2312
},
"TerritoryId": 960,
"InteractionType": "Interact",
"TargetTerritoryId": 960,
"AetheryteShortcut": "Ultima Thule - Base Omicron",
"SkipConditions": {
"AetheryteShortcutIf": {
"NearPosition": {
"Position": {
"X": 489.2804,
"Y": 437.5829,
"Z": 333.63843
},
"MaximumDistance": 100
}
}
}
},
{ {
"DataId": 1043417, "DataId": 1043417,
"Position": { "Position": {

View File

@ -1,7 +1,6 @@
{ {
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza", "Author": "liza",
"Disabled": true,
"QuestSequence": [ "QuestSequence": [
{ {
"Sequence": 0, "Sequence": 0,
@ -18,9 +17,73 @@
} }
] ]
}, },
{
"Sequence": 1,
"Steps": [
{
"TerritoryId": 960,
"InteractionType": "None",
"RequiredGatheredItems": [
{
"QuestAcceptedAsClass": "Miner",
"ItemId": 38284,
"ItemCount": 3
},
{
"QuestAcceptedAsClass": "Botanist",
"ItemId": 38308,
"ItemCount": 3
}
]
},
{
"DataId": 1043421,
"Position": {
"X": 2.4261475,
"Y": 499.87805,
"Z": 46.036377
},
"TerritoryId": 1073,
"InteractionType": "Interact",
"TargetTerritoryId": 960
},
{
"DataId": 1043865,
"Position": {
"X": 301.8081,
"Y": 482.13644,
"Z": 165.02625
},
"TerritoryId": 960,
"InteractionType": "Interact",
"TargetTerritoryId": 960
},
{
"DataId": 1043936,
"Position": {
"X": 194.56775,
"Y": 567.4998,
"Z": 250.93457
},
"TerritoryId": 960,
"InteractionType": "Interact"
}
]
},
{ {
"Sequence": 255, "Sequence": 255,
"Steps": [ "Steps": [
{
"DataId": 1043864,
"Position": {
"X": 244.83093,
"Y": 564.8203,
"Z": 261.76843
},
"TerritoryId": 960,
"InteractionType": "Interact",
"TargetTerritoryId": 960
},
{ {
"DataId": 1043417, "DataId": 1043417,
"Position": { "Position": {

View File

@ -298,6 +298,22 @@
}, },
"RequiredQuestVariablesNotMet": { "RequiredQuestVariablesNotMet": {
"type": "boolean" "type": "boolean"
},
"NearPosition": {
"type": "object",
"properties": {
"Position": {
"$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/Vector3"
},
"MaximumDistance": {
"type": "number"
}
},
"required": [
"Position",
"MaximumDistance"
],
"additionalProperties": false
} }
}, },
"additionalProperties": false "additionalProperties": false

View File

@ -11,4 +11,5 @@ public sealed class SkipAetheryteCondition
public EAetheryteLocation? AetheryteLocked { get; set; } public EAetheryteLocation? AetheryteLocked { get; set; }
public EAetheryteLocation? AetheryteUnlocked { get; set; } public EAetheryteLocation? AetheryteUnlocked { get; set; }
public bool RequiredQuestVariablesNotMet { get; set; } public bool RequiredQuestVariablesNotMet { get; set; }
public NearPositionCondition? NearPosition { get; set; }
} }

View File

@ -108,7 +108,7 @@ internal static class UseItem
ushort territoryId = 129; ushort territoryId = 129;
Vector3 destination = new(-360.9217f, 8f, 38.92566f); Vector3 destination = new(-360.9217f, 8f, 38.92566f);
yield return serviceProvider.GetRequiredService<AetheryteShortcut.UseAetheryteShortcut>() yield return serviceProvider.GetRequiredService<AetheryteShortcut.UseAetheryteShortcut>()
.With(null, EAetheryteLocation.Limsa, territoryId); .With(null, null, EAetheryteLocation.Limsa, territoryId);
yield return serviceProvider.GetRequiredService<AethernetShortcut.UseAethernetShortcut>() yield return serviceProvider.GetRequiredService<AethernetShortcut.UseAethernetShortcut>()
.With(EAetheryteLocation.Limsa, EAetheryteLocation.LimsaArcanist); .With(EAetheryteLocation.Limsa, EAetheryteLocation.LimsaArcanist);
yield return serviceProvider.GetRequiredService<WaitAtEnd.WaitDelay>(); yield return serviceProvider.GetRequiredService<WaitAtEnd.WaitDelay>();

View File

@ -2,9 +2,11 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Numerics; using System.Numerics;
using Dalamud.Plugin.Services; using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Application.Network.WorkDefinitions;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Questionable.Controller.Steps.Common; using Questionable.Controller.Steps.Common;
using Questionable.Controller.Utils;
using Questionable.Data; using Questionable.Data;
using Questionable.Functions; using Questionable.Functions;
using Questionable.Model; using Questionable.Model;
@ -25,13 +27,15 @@ internal static class AetheryteShortcut
return null; return null;
return serviceProvider.GetRequiredService<UseAetheryteShortcut>() return serviceProvider.GetRequiredService<UseAetheryteShortcut>()
.With(step, step.AetheryteShortcut.Value, aetheryteData.TerritoryIds[step.AetheryteShortcut.Value]); .With(step, quest.Id, step.AetheryteShortcut.Value,
aetheryteData.TerritoryIds[step.AetheryteShortcut.Value]);
} }
} }
internal sealed class UseAetheryteShortcut( internal sealed class UseAetheryteShortcut(
ILogger<UseAetheryteShortcut> logger, ILogger<UseAetheryteShortcut> logger,
AetheryteFunctions aetheryteFunctions, AetheryteFunctions aetheryteFunctions,
QuestFunctions questFunctions,
IClientState clientState, IClientState clientState,
IChatGui chatGui, IChatGui chatGui,
AetheryteData aetheryteData) : ISkippableTask AetheryteData aetheryteData) : ISkippableTask
@ -40,6 +44,7 @@ internal static class AetheryteShortcut
private DateTime _continueAt; private DateTime _continueAt;
public QuestStep? Step { get; set; } public QuestStep? Step { get; set; }
public ElementId? ElementId { get; set; }
public EAetheryteLocation TargetAetheryte { get; set; } public EAetheryteLocation TargetAetheryte { get; set; }
/// <summary> /// <summary>
@ -48,9 +53,11 @@ internal static class AetheryteShortcut
/// </summary> /// </summary>
public ushort ExpectedTerritoryId { get; set; } public ushort ExpectedTerritoryId { get; set; }
public ITask With(QuestStep? step, EAetheryteLocation targetAetheryte, ushort expectedTerritoryId) public ITask With(QuestStep? step, ElementId? elementId, EAetheryteLocation targetAetheryte,
ushort expectedTerritoryId)
{ {
Step = step; Step = step;
ElementId = elementId;
TargetAetheryte = targetAetheryte; TargetAetheryte = targetAetheryte;
ExpectedTerritoryId = expectedTerritoryId; ExpectedTerritoryId = expectedTerritoryId;
return this; return this;
@ -102,6 +109,30 @@ internal static class AetheryteShortcut
logger.LogInformation("Skipping aetheryte teleport due to SkipCondition (AetheryteUnlocked)"); logger.LogInformation("Skipping aetheryte teleport due to SkipCondition (AetheryteUnlocked)");
return true; return true;
} }
if (ElementId != null)
{
QuestProgressInfo? questWork = questFunctions.GetQuestProgressInfo(ElementId);
if (skipConditions.RequiredQuestVariablesNotMet &&
questWork != null &&
!QuestWorkUtils.MatchesRequiredQuestWorkConfig(Step.RequiredQuestVariables, questWork,
logger))
{
logger.LogInformation("Skipping aetheryte teleport, as required variables do not match");
return true;
}
}
if (skipConditions.NearPosition is { } nearPosition && clientState.TerritoryType == Step.TerritoryId)
{
if (Vector3.Distance(nearPosition.Position, clientState.LocalPlayer!.Position) <= nearPosition.MaximumDistance)
{
logger.LogInformation("Skipping aetheryte shortcut, as we're near the position");
return true;
}
}
} }
if (ExpectedTerritoryId == territoryType) if (ExpectedTerritoryId == territoryType)
@ -139,7 +170,6 @@ internal static class AetheryteShortcut
private bool DoTeleport() private bool DoTeleport()
{ {
if (!aetheryteFunctions.CanTeleport(TargetAetheryte)) if (!aetheryteFunctions.CanTeleport(TargetAetheryte))
{ {
if (!aetheryteFunctions.IsTeleportUnlocked()) if (!aetheryteFunctions.IsTeleportUnlocked())

View File

@ -121,7 +121,7 @@ internal static class Craft
if (addon != null) if (addon != null)
{ {
logger.LogInformation("Closing crafting window"); logger.LogInformation("Closing crafting window");
addon->Close(true); addon->FireCallbackInt(-1);
return ETaskResult.TaskComplete; return ETaskResult.TaskComplete;
} }
} }

View File

@ -174,19 +174,17 @@ internal static class SkipCondition
return true; return true;
} }
if (ElementId is QuestId || ElementId is LeveId) QuestProgressInfo? questWork = questFunctions.GetQuestProgressInfo(ElementId);
if (questWork != null)
{ {
QuestProgressInfo? questWork = questFunctions.GetQuestProgressInfo(ElementId); if (QuestWorkUtils.HasCompletionFlags(Step.CompletionQuestVariablesFlags) &&
if (QuestWorkUtils.HasCompletionFlags(Step.CompletionQuestVariablesFlags) && questWork != null) QuestWorkUtils.MatchesQuestWork(Step.CompletionQuestVariablesFlags, questWork))
{ {
if (QuestWorkUtils.MatchesQuestWork(Step.CompletionQuestVariablesFlags, questWork)) logger.LogInformation("Skipping step, as quest variables match (step is complete)");
{ return true;
logger.LogInformation("Skipping step, as quest variables match (step is complete)");
return true;
}
} }
if (Step is { SkipConditions.StepIf: { } conditions } && questWork != null) if (Step is { SkipConditions.StepIf: { } conditions })
{ {
if (QuestWorkUtils.MatchesQuestWork(conditions.CompletionQuestVariablesFlags, questWork)) if (QuestWorkUtils.MatchesQuestWork(conditions.CompletionQuestVariablesFlags, questWork))
{ {
@ -195,7 +193,7 @@ internal static class SkipCondition
} }
} }
if (Step is { RequiredQuestVariables: { } requiredQuestVariables } && questWork != null) if (Step is { RequiredQuestVariables: { } requiredQuestVariables })
{ {
if (!QuestWorkUtils.MatchesRequiredQuestWorkConfig(requiredQuestVariables, questWork, logger)) if (!QuestWorkUtils.MatchesRequiredQuestWorkConfig(requiredQuestVariables, questWork, logger))
{ {

View File

@ -1,9 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using FFXIVClientStructs.FFXIV.Application.Network.WorkDefinitions;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Questionable.Controller.Steps.Shared;
using Questionable.Model; using Questionable.Model;
using Questionable.Model.Questing; using Questionable.Model.Questing;
@ -61,7 +59,7 @@ internal static class QuestWorkUtils
} }
public static bool MatchesRequiredQuestWorkConfig(List<List<QuestWorkValue>?> requiredQuestVariables, public static bool MatchesRequiredQuestWorkConfig(List<List<QuestWorkValue>?> requiredQuestVariables,
QuestProgressInfo questWork, ILogger<SkipCondition.CheckSkip> logger) QuestProgressInfo questWork, ILogger logger)
{ {
if (requiredQuestVariables.Count != 6 || requiredQuestVariables.All(x => x == null || x.Count == 0)) if (requiredQuestVariables.Count != 6 || requiredQuestVariables.All(x => x == null || x.Count == 0))
{ {