1
0
forked from liza/Questionable

Handle how required classes are configured for individual quest steps + gathering

This commit is contained in:
Liza 2024-11-04 17:19:49 +01:00
parent d757250d62
commit cc8f326d7e
Signed by: liza
GPG Key ID: 7199F8D727D55F67
63 changed files with 1000 additions and 226 deletions

2
LLib

@ -1 +1 @@
Subproject commit 912a7b04ce180e337af9beeef2d1393b040c1ba8 Subproject commit fde09c705b648f03c287814191a554f0a4b92cc4

View File

@ -29,10 +29,6 @@ internal static class GatheredItemExtensions
.AsSyntaxNodeOrToken(), .AsSyntaxNodeOrToken(),
Assignment(nameof(GatheredItem.Collectability), gatheredItem.Collectability, Assignment(nameof(GatheredItem.Collectability), gatheredItem.Collectability,
emptyItem.Collectability) emptyItem.Collectability)
.AsSyntaxNodeOrToken(),
Assignment(nameof(GatheredItem.QuestAcceptedAsClass),
gatheredItem.QuestAcceptedAsClass,
emptyItem.QuestAcceptedAsClass)
.AsSyntaxNodeOrToken())))); .AsSyntaxNodeOrToken()))));
} }
} }

View File

@ -120,6 +120,12 @@ internal static class QuestStepExtensions
AssignmentList(nameof(QuestStep.RequiredQuestVariables), AssignmentList(nameof(QuestStep.RequiredQuestVariables),
step.RequiredQuestVariables) step.RequiredQuestVariables)
.AsSyntaxNodeOrToken(), .AsSyntaxNodeOrToken(),
AssignmentList(nameof(QuestStep.RequiredCurrentJob),
step.RequiredCurrentJob)
.AsSyntaxNodeOrToken(),
AssignmentList(nameof(QuestStep.RequiredQuestAcceptedJob),
step.RequiredQuestAcceptedJob)
.AsSyntaxNodeOrToken(),
AssignmentList(nameof(QuestStep.ItemsToGather), AssignmentList(nameof(QuestStep.ItemsToGather),
step.ItemsToGather), step.ItemsToGather),
AssignmentList(nameof(QuestStep.CompletionQuestVariablesFlags), AssignmentList(nameof(QuestStep.CompletionQuestVariablesFlags),

View File

@ -40,10 +40,88 @@
{ {
"Sequence": 255, "Sequence": 255,
"Steps": [ "Steps": [
{
"Position": {
"X": -12.223117,
"Y": -2.0482793,
"Z": -145.75566
},
"TerritoryId": 141,
"InteractionType": "WalkTo"
},
{ {
"TerritoryId": 141, "TerritoryId": 141,
"InteractionType": "EquipRecommended" "InteractionType": "EquipRecommended"
}, },
{
"DataId": 1001564,
"Position": {
"X": -9.689575,
"Y": -2.0480804,
"Z": -145.09808
},
"TerritoryId": 141,
"InteractionType": "PurchaseItem",
"PurchaseMenu": {
"ExcelSheet": "GilShop",
"Key": 262186
},
"ItemId": 2654,
"ItemCount": 1,
"RequiredCurrentJob": [
"DoW"
],
"SkipConditions": {
"StepIf": {
"Item": {
"NotInInventory": false
}
}
}
},
{
"DataId": 1001564,
"Position": {
"X": -9.689575,
"Y": -2.0480804,
"Z": -145.09808
},
"TerritoryId": 141,
"InteractionType": "PurchaseItem",
"PurchaseMenu": {
"ExcelSheet": "GilShop",
"Key": 262186
},
"ItemId": 2655,
"ItemCount": 1,
"RequiredCurrentJob": [
"DoM"
]
},
{
"TerritoryId": 141,
"InteractionType": "EquipItem",
"ItemId": 2654,
"SkipConditions": {
"StepIf": {
"Item": {
"NotInInventory": true
}
}
}
},
{
"TerritoryId": 141,
"InteractionType": "EquipItem",
"ItemId": 2655,
"SkipConditions": {
"StepIf": {
"Item": {
"NotInInventory": true
}
}
}
},
{ {
"DataId": 1001447, "DataId": 1001447,
"Position": { "Position": {
@ -52,8 +130,7 @@
"Z": -148.51611 "Z": -148.51611
}, },
"TerritoryId": 141, "TerritoryId": 141,
"InteractionType": "CompleteQuest", "InteractionType": "CompleteQuest"
"Comment": "All starting gear (except the hat) is ilvl 5 already"
} }
] ]
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29517, "ItemId": 29517,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29543, "ItemId": 29543,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29518, "ItemId": 29518,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29544, "ItemId": 29544,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29519, "ItemId": 29519,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29545, "ItemId": 29545,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29520, "ItemId": 29520,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29546, "ItemId": 29546,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29521, "ItemId": 29521,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29547, "ItemId": 29547,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29522, "ItemId": 29522,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29548, "ItemId": 29548,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29523, "ItemId": 29523,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29549, "ItemId": 29549,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29524, "ItemId": 29524,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29550, "ItemId": 29550,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29525, "ItemId": 29525,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29551, "ItemId": 29551,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29526, "ItemId": 29526,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29552, "ItemId": 29552,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29527, "ItemId": 29527,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29553, "ItemId": 29553,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29528, "ItemId": 29528,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29554, "ItemId": 29554,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29529, "ItemId": 29529,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29555, "ItemId": 29555,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29530, "ItemId": 29530,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29556, "ItemId": 29556,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29531, "ItemId": 29531,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29557, "ItemId": 29557,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29532, "ItemId": 29532,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29558, "ItemId": 29558,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29533, "ItemId": 29533,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29559, "ItemId": 29559,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,25 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29534, "ItemId": 29534,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29560, "ItemId": 29560,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29535, "ItemId": 29535,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29561, "ItemId": 29561,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29536, "ItemId": 29536,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29562, "ItemId": 29562,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -40,14 +40,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29513, "ItemId": 29513,
"ItemCount": 1 "ItemCount": 1
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29539, "ItemId": 29539,
"ItemCount": 1 "ItemCount": 1
} }

View File

@ -55,14 +55,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29514, "ItemId": 29514,
"ItemCount": 1 "ItemCount": 1
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29540, "ItemId": 29540,
"ItemCount": 1 "ItemCount": 1
} }

View File

@ -38,14 +38,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29515, "ItemId": 29515,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29541, "ItemId": 29541,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -85,14 +85,24 @@
{ {
"TerritoryId": 817, "TerritoryId": 817,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 29516, "ItemId": 29516,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 817,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 29542, "ItemId": 29542,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 960, "TerritoryId": 960,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38281, "ItemId": 38281,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 960,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38305, "ItemId": 38305,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 960, "TerritoryId": 960,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38282, "ItemId": 38282,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 960,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38306, "ItemId": 38306,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -34,14 +34,24 @@
{ {
"TerritoryId": 1073, "TerritoryId": 1073,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38284, "ItemId": 38284,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 1073,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38308, "ItemId": 38308,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 960, "TerritoryId": 960,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38283, "ItemId": 38283,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 960,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38307, "ItemId": 38307,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -34,14 +34,24 @@
{ {
"TerritoryId": 1073, "TerritoryId": 1073,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38285, "ItemId": 38285,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 1073,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38309, "ItemId": 38309,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,19 +23,28 @@
{ {
"TerritoryId": 960, "TerritoryId": 960,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38286, "ItemId": 38286,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 960,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38310, "ItemId": 38310,
"ItemCount": 3 "ItemCount": 3
} }
], ]
"Fly": true
}, },
{ {
"DataId": 2013072, "DataId": 2013072,

View File

@ -35,14 +35,24 @@
{ {
"TerritoryId": 1073, "TerritoryId": 1073,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38287, "ItemId": 38287,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 1073,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38311, "ItemId": 38311,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -35,14 +35,24 @@
{ {
"TerritoryId": 1073, "TerritoryId": 1073,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38288, "ItemId": 38288,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 1073,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38312, "ItemId": 38312,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -49,14 +49,24 @@
{ {
"TerritoryId": 1073, "TerritoryId": 1073,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38289, "ItemId": 38289,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 1073,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38313, "ItemId": 38313,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 960, "TerritoryId": 960,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38290, "ItemId": 38290,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 960,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38314, "ItemId": 38314,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -35,14 +35,24 @@
{ {
"TerritoryId": 1073, "TerritoryId": 1073,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38291, "ItemId": 38291,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 1073,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38315, "ItemId": 38315,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -34,14 +34,24 @@
{ {
"TerritoryId": 1073, "TerritoryId": 1073,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38292, "ItemId": 38292,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 1073,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38316, "ItemId": 38316,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -34,14 +34,24 @@
{ {
"TerritoryId": 1073, "TerritoryId": 1073,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38293, "ItemId": 38293,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 1073,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38317, "ItemId": 38317,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 960, "TerritoryId": 960,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38294, "ItemId": 38294,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 960,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38318, "ItemId": 38318,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 960, "TerritoryId": 960,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38295, "ItemId": 38295,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 960,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38319, "ItemId": 38319,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -49,14 +49,24 @@
{ {
"TerritoryId": 1073, "TerritoryId": 1073,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38296, "ItemId": 38296,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 1073,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38320, "ItemId": 38320,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -23,14 +23,24 @@
{ {
"TerritoryId": 960, "TerritoryId": 960,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38297, "ItemId": 38297,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 960,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38321, "ItemId": 38321,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -24,14 +24,25 @@
"TerritoryId": 960, "TerritoryId": 960,
"InteractionType": "Gather", "InteractionType": "Gather",
"AetheryteShortcut": "Ultima Thule - Reah Tahra", "AetheryteShortcut": "Ultima Thule - Reah Tahra",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38299, "ItemId": 38299,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 960,
"InteractionType": "Gather",
"AetheryteShortcut": "Ultima Thule - Reah Tahra",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38323, "ItemId": 38323,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -34,14 +34,24 @@
{ {
"TerritoryId": 1073, "TerritoryId": 1073,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38298, "ItemId": 38298,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 1073,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38322, "ItemId": 38322,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -116,14 +116,24 @@
{ {
"TerritoryId": 960, "TerritoryId": 960,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38276, "ItemId": 38276,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 960,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38300, "ItemId": 38300,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -172,14 +172,24 @@
{ {
"TerritoryId": 960, "TerritoryId": 960,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38277, "ItemId": 38277,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 960,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38301, "ItemId": 38301,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -140,19 +140,28 @@
{ {
"TerritoryId": 960, "TerritoryId": 960,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38278, "ItemId": 38278,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 960,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38302, "ItemId": 38302,
"ItemCount": 3 "ItemCount": 3
} }
], ]
"Fly": true
}, },
{ {
"DataId": 2013072, "DataId": 2013072,

View File

@ -92,14 +92,24 @@
{ {
"TerritoryId": 398, "TerritoryId": 398,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38279, "ItemId": 38279,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 398,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38303, "ItemId": 38303,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -157,14 +157,24 @@
{ {
"TerritoryId": 1073, "TerritoryId": 1073,
"InteractionType": "Gather", "InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Miner"
],
"ItemsToGather": [ "ItemsToGather": [
{ {
"QuestAcceptedAsClass": "Miner",
"ItemId": 38280, "ItemId": 38280,
"ItemCount": 3 "ItemCount": 3
}
]
}, },
{ {
"QuestAcceptedAsClass": "Botanist", "TerritoryId": 1073,
"InteractionType": "Gather",
"RequiredQuestAcceptedJob": [
"Botanist"
],
"ItemsToGather": [
{
"ItemId": 38304, "ItemId": 38304,
"ItemCount": 3 "ItemCount": 3
} }

View File

@ -422,6 +422,20 @@
} }
} }
}, },
"RequiredCurrentJob": {
"description": "Which class or job you are using whenever this step gets executed",
"type": "array",
"items": {
"$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/ClassJob"
}
},
"RequiredQuestAcceptedJob": {
"description": "Which class or job you were using when accepting this quest (e.g. for beast tribes)",
"type": "array",
"items": {
"$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/ClassJob"
}
},
"DelaySecondsAtStart": { "DelaySecondsAtStart": {
"description": "Time to wait before starting", "description": "Time to wait before starting",
"type": [ "type": [
@ -1313,13 +1327,6 @@
"type": "number", "type": "number",
"minimum": 0, "minimum": 0,
"maximum": 1000 "maximum": 1000
},
"QuestAcceptedAsClass": {
"type": "string",
"enum": [
"Miner",
"Botanist"
]
} }
}, },
"required": [ "required": [

View File

@ -1,26 +0,0 @@
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Questionable.Model.Questing.Converter;
internal sealed class ClassJobConverter : JsonConverter<uint>
{
public override uint Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
if (reader.TokenType != JsonTokenType.String)
throw new JsonException();
return reader.GetString() switch
{
"Miner" => 16,
"Botanist" => 17,
_ => throw new JsonException("Unsupported value for classjob"),
};
}
public override void Write(Utf8JsonWriter writer, uint value, JsonSerializerOptions options)
{
throw new NotImplementedException();
}
}

View File

@ -0,0 +1,57 @@
using System.Collections.Generic;
using Questionable.Model.Common.Converter;
namespace Questionable.Model.Questing.Converter;
internal sealed class ExtendedClassJobConverter() : EnumConverter<EExtendedClassJob>(Values)
{
private static readonly Dictionary<EExtendedClassJob, string> Values = new()
{
{ EExtendedClassJob.Gladiator, "Gladiator" },
{ EExtendedClassJob.Pugilist, "Pugilist" },
{ EExtendedClassJob.Marauder, "Marauder" },
{ EExtendedClassJob.Lancer, "Lancer" },
{ EExtendedClassJob.Archer, "Archer" },
{ EExtendedClassJob.Conjurer, "Conjurer" },
{ EExtendedClassJob.Thaumaturge, "Thaumaturge" },
{ EExtendedClassJob.Carpenter, "Carpenter" },
{ EExtendedClassJob.Blacksmith, "Blacksmith" },
{ EExtendedClassJob.Armorer, "Armorer" },
{ EExtendedClassJob.Goldsmith, "Goldsmith" },
{ EExtendedClassJob.Leatherworker, "Leatherworker" },
{ EExtendedClassJob.Weaver, "Weaver" },
{ EExtendedClassJob.Alchemist, "Alchemist" },
{ EExtendedClassJob.Culinarian, "Culinarian" },
{ EExtendedClassJob.Miner, "Miner" },
{ EExtendedClassJob.Botanist, "Botanist" },
{ EExtendedClassJob.Fisher, "Fisher" },
{ EExtendedClassJob.Paladin, "Paladin" },
{ EExtendedClassJob.Monk, "Monk" },
{ EExtendedClassJob.Warrior, "Warrior" },
{ EExtendedClassJob.Dragoon, "Dragoon" },
{ EExtendedClassJob.Bard, "Bard" },
{ EExtendedClassJob.WhiteMage, "White Mage" },
{ EExtendedClassJob.BlackMage, "Black Mage" },
{ EExtendedClassJob.Arcanist, "Arcanist" },
{ EExtendedClassJob.Summoner, "Summoner" },
{ EExtendedClassJob.Scholar, "Scholar" },
{ EExtendedClassJob.Rogue, "Rogue" },
{ EExtendedClassJob.Ninja, "Ninja" },
{ EExtendedClassJob.Machinist, "Machinist" },
{ EExtendedClassJob.DarkKnight, "Dark Knight" },
{ EExtendedClassJob.Astrologian, "Astrologian" },
{ EExtendedClassJob.Samurai, "Samurai" },
{ EExtendedClassJob.RedMage, "Red Mage" },
{ EExtendedClassJob.BlueMage, "Blue Mage" },
{ EExtendedClassJob.Gunbreaker, "Gunbreaker" },
{ EExtendedClassJob.Dancer, "Dancer" },
{ EExtendedClassJob.Reaper, "Reaper" },
{ EExtendedClassJob.Sage, "Sage" },
{ EExtendedClassJob.Viper, "Viper" },
{ EExtendedClassJob.Pictomancer, "Pictomancer" },
{ EExtendedClassJob.DoW, "DoW" },
{ EExtendedClassJob.DoM, "DoM" },
{ EExtendedClassJob.DoH, "DoH" },
{ EExtendedClassJob.DoL, "DoL" },
};
}

View File

@ -0,0 +1,55 @@
using System.Text.Json.Serialization;
using Questionable.Model.Questing.Converter;
namespace Questionable.Model.Questing;
[JsonConverter(typeof(ExtendedClassJobConverter))]
public enum EExtendedClassJob
{
Gladiator,
Pugilist,
Marauder,
Lancer,
Archer,
Conjurer,
Thaumaturge,
Carpenter,
Blacksmith,
Armorer,
Goldsmith,
Leatherworker,
Weaver,
Alchemist,
Culinarian,
Miner,
Botanist,
Fisher,
Paladin,
Monk,
Warrior,
Dragoon,
Bard,
WhiteMage,
BlackMage,
Arcanist,
Summoner,
Scholar,
Rogue,
Ninja,
Machinist,
DarkKnight,
Astrologian,
Samurai,
RedMage,
BlueMage,
Gunbreaker,
Dancer,
Reaper,
Sage,
Viper,
Pictomancer,
DoW,
DoM,
DoH,
DoL,
}

View File

@ -9,10 +9,4 @@ public sealed class GatheredItem
public uint AlternativeItemId { get; set; } public uint AlternativeItemId { get; set; }
public int ItemCount { get; set; } public int ItemCount { get; set; }
public ushort Collectability { get; set; } public ushort Collectability { get; set; }
/// <summary>
/// Either miner or botanist; null if it is irrelevant (prefers current class/job, then any unlocked ones).
/// </summary>
[JsonConverter(typeof(ClassJobConverter))]
public uint? QuestAcceptedAsClass { get; set; }
} }

View File

@ -76,6 +76,8 @@ public sealed class QuestStep
public SkipConditions? SkipConditions { get; set; } public SkipConditions? SkipConditions { get; set; }
public List<List<QuestWorkValue>?> RequiredQuestVariables { get; set; } = new(); public List<List<QuestWorkValue>?> RequiredQuestVariables { get; set; } = new();
public List<EExtendedClassJob> RequiredCurrentJob { get; set; } = [];
public List<EExtendedClassJob> RequiredQuestAcceptedJob { get; set; } = [];
public List<GatheredItem> ItemsToGather { get; set; } = []; public List<GatheredItem> ItemsToGather { get; set; } = [];
public List<QuestWorkValue?> CompletionQuestVariablesFlags { get; set; } = []; public List<QuestWorkValue?> CompletionQuestVariablesFlags { get; set; } = [];
public List<DialogueChoice> DialogueChoices { get; set; } = []; public List<DialogueChoice> DialogueChoices { get; set; } = [];

View File

@ -282,6 +282,57 @@
"[Solution Nine] Scanning Port Nine (Heritage Found)" "[Solution Nine] Scanning Port Nine (Heritage Found)"
] ]
}, },
"ClassJob": {
"type": "string",
"enum": [
"Gladiator",
"Pugilist",
"Marauder",
"Lancer",
"Archer",
"Conjurer",
"Thaumaturge",
"Carpenter",
"Blacksmith",
"Armorer",
"Goldsmith",
"Leatherworker",
"Weaver",
"Alchemist",
"Culinarian",
"Miner",
"Botanist",
"Fisher",
"Paladin",
"Monk",
"Warrior",
"Dragoon",
"Bard",
"White Mage",
"Black Mage",
"Arcanist",
"Summoner",
"Scholar",
"Rogue",
"Ninja",
"Machinist",
"Dark Knight",
"Astrologian",
"Samurai",
"Red Mage",
"Blue Mage",
"Gunbreaker",
"Dancer",
"Reaper",
"Sage",
"Viper",
"Pictomancer",
"DoW",
"DoM",
"DoH",
"DoL"
]
},
"CompletionFlags": { "CompletionFlags": {
"type": "array", "type": "array",
"description": "Quest Variables that dictate whether or not this step is skipped: null is don't check, positive values need to be set, negative values need to be unset", "description": "Quest Variables that dictate whether or not this step is skipped: null is don't check, positive values need to be set, negative values need to be unset",

View File

@ -123,12 +123,12 @@ internal sealed class ContextMenuController : IDisposable
Prefix = SeIconChar.Hyadelyn, Prefix = SeIconChar.Hyadelyn,
PrefixColor = 52, PrefixColor = 52,
Name = name, Name = name,
OnClicked = _ => StartGathering(npcId, itemId, quantityToGather, collectability, classJob), OnClicked = _ => StartGathering(npcId, itemId, quantityToGather, collectability),
IsEnabled = string.IsNullOrEmpty(lockedReasonn), IsEnabled = string.IsNullOrEmpty(lockedReasonn),
}); });
} }
private void StartGathering(uint npcId, uint itemId, int quantity, ushort collectability, EClassJob classJob) private void StartGathering(uint npcId, uint itemId, int quantity, ushort collectability)
{ {
var info = (SatisfactionSupplyInfo)_questData.GetAllByIssuerDataId(npcId) var info = (SatisfactionSupplyInfo)_questData.GetAllByIssuerDataId(npcId)
.Single(x => x is SatisfactionSupplyInfo); .Single(x => x is SatisfactionSupplyInfo);
@ -142,7 +142,6 @@ internal sealed class ContextMenuController : IDisposable
ItemId = itemId, ItemId = itemId,
ItemCount = quantity, ItemCount = quantity,
Collectability = collectability, Collectability = collectability,
QuestAcceptedAsClass = (uint)classJob,
} }
]; ];
_questController.SetGatheringQuest(quest); _questController.SetGatheringQuest(quest);

View File

@ -36,26 +36,13 @@ internal static class Gather
foreach (var itemToGather in step.ItemsToGather) foreach (var itemToGather in step.ItemsToGather)
{ {
EClassJob currentClassJob = (EClassJob)clientState.LocalPlayer!.ClassJob.Id; EClassJob currentClassJob = (EClassJob)clientState.LocalPlayer!.ClassJob.Id;
EClassJob classJob = currentClassJob; if (!gatheringData.TryGetGatheringPointId(itemToGather.ItemId, currentClassJob,
if (itemToGather.QuestAcceptedAsClass != null)
{
classJob = (EClassJob)itemToGather.QuestAcceptedAsClass.Value;
if (!IsClassJobQuestWasAcceptedWith(quest.Id, classJob))
continue;
}
if (!gatheringData.TryGetGatheringPointId(itemToGather.ItemId, classJob,
out GatheringPointId? gatheringPointId)) out GatheringPointId? gatheringPointId))
throw new TaskException($"No gathering point found for item {itemToGather.ItemId}"); throw new TaskException($"No gathering point found for item {itemToGather.ItemId}");
if (!gatheringPointRegistry.TryGetGatheringPoint(gatheringPointId, out GatheringRoot? gatheringRoot)) if (!gatheringPointRegistry.TryGetGatheringPoint(gatheringPointId, out GatheringRoot? gatheringRoot))
throw new TaskException($"No path found for gathering point {gatheringPointId}"); throw new TaskException($"No path found for gathering point {gatheringPointId}");
if (classJob != currentClassJob)
{
yield return new SwitchClassJob.Task(classJob);
}
if (HasRequiredItems(itemToGather)) if (HasRequiredItems(itemToGather))
continue; continue;
@ -89,18 +76,6 @@ internal static class Gather
} }
} }
private unsafe bool IsClassJobQuestWasAcceptedWith(ElementId questId, EClassJob expectedClassJob)
{
if (questId is not QuestId)
return true;
QuestWork* questWork = QuestManager.Instance()->GetQuestById(questId.Value);
if (questWork->AcceptClassJob != 0)
return (EClassJob)questWork->AcceptClassJob == expectedClassJob;
return true;
}
private unsafe bool HasRequiredItems(GatheredItem itemToGather) private unsafe bool HasRequiredItems(GatheredItem itemToGather)
{ {
InventoryManager* inventoryManager = InventoryManager.Instance(); InventoryManager* inventoryManager = InventoryManager.Instance();

View File

@ -1,4 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Numerics; using System.Numerics;
using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Game.ClientState.Objects.Types;
@ -6,8 +7,10 @@ using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.Game; using FFXIVClientStructs.FFXIV.Client.Game;
using FFXIVClientStructs.FFXIV.Client.Game.Object; using FFXIVClientStructs.FFXIV.Client.Game.Object;
using FFXIVClientStructs.FFXIV.Client.Game.UI; using FFXIVClientStructs.FFXIV.Client.Game.UI;
using LLib.GameData;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Questionable.Controller.Utils; using Questionable.Controller.Utils;
using Questionable.Data;
using Questionable.Functions; using Questionable.Functions;
using Questionable.Model; using Questionable.Model;
using Questionable.Model.Common; using Questionable.Model.Common;
@ -29,7 +32,9 @@ internal static class SkipCondition
!QuestWorkUtils.HasCompletionFlags(step.CompletionQuestVariablesFlags) && !QuestWorkUtils.HasCompletionFlags(step.CompletionQuestVariablesFlags) &&
step.RequiredQuestVariables.Count == 0 && step.RequiredQuestVariables.Count == 0 &&
step.PickUpQuestId == null && step.PickUpQuestId == null &&
step.NextQuestId == null) step.NextQuestId == null &&
step.RequiredCurrentJob.Count == 0 &&
step.RequiredQuestAcceptedJob.Count == 0)
return null; return null;
return new SkipTask(step, skipConditions ?? new(), quest.Id); return new SkipTask(step, skipConditions ?? new(), quest.Id);
@ -136,7 +141,8 @@ internal static class SkipCondition
GameObject* gameObject = (GameObject*)target.Address; GameObject* gameObject = (GameObject*)target.Address;
if (!skipConditions.NotNamePlateIconId.Contains(gameObject->NamePlateIconId)) if (!skipConditions.NotNamePlateIconId.Contains(gameObject->NamePlateIconId))
{ {
logger.LogInformation("Skipping step, object has icon id {IconId}", gameObject->NamePlateIconId); logger.LogInformation("Skipping step, object has icon id {IconId}",
gameObject->NamePlateIconId);
return true; return true;
} }
} }
@ -213,6 +219,34 @@ internal static class SkipCondition
return true; return true;
} }
} }
if (step is { RequiredQuestAcceptedJob.Count: > 0 })
{
List<EClassJob> expectedJobs = step.RequiredQuestAcceptedJob
.SelectMany(ClassJobUtils.AsIndividualJobs).ToList();
EClassJob questJob = questWork.ClassJob;
logger.LogInformation("Checking quest job {QuestJob} against {ExpectedJobs}", questJob,
string.Join(",", expectedJobs));
if (questJob != EClassJob.Adventurer && !expectedJobs.Contains(questJob))
{
logger.LogInformation("Skipping step, as quest was accepted on a different job");
return true;
}
}
}
if (step is { RequiredCurrentJob.Count: > 0 })
{
List<EClassJob> expectedJobs =
step.RequiredCurrentJob.SelectMany(ClassJobUtils.AsIndividualJobs).ToList();
EClassJob currentJob = (EClassJob)clientState.LocalPlayer!.ClassJob.Id;
logger.LogInformation("Checking current job {CurrentJob} against {ExpectedJobs}", currentJob,
string.Join(",", expectedJobs));
if (!expectedJobs.Contains(currentJob))
{
logger.LogInformation("Skipping step, as step requires a different job");
return true;
}
} }
if (skipConditions.NearPosition is { } nearPosition && if (skipConditions.NearPosition is { } nearPosition &&
@ -231,7 +265,8 @@ internal static class SkipCondition
var position = clientState.LocalPlayer?.Position; var position = clientState.LocalPlayer?.Position;
if (position != null && if (position != null &&
clientState.TerritoryType != 0 && clientState.TerritoryType != 0 &&
MatchesExtraCondition(skipConditions.ExtraCondition.Value, position.Value, clientState.TerritoryType)) MatchesExtraCondition(skipConditions.ExtraCondition.Value, position.Value,
clientState.TerritoryType))
{ {
logger.LogInformation("Skipping step, extra condition {} matches", skipConditions.ExtraCondition); logger.LogInformation("Skipping step, extra condition {} matches", skipConditions.ExtraCondition);
return true; return true;

View File

@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.Linq;
using LLib.GameData;
using Questionable.Model.Questing;
namespace Questionable.Data;
public static class ClassJobUtils
{
public static IEnumerable<EClassJob> AsIndividualJobs(EExtendedClassJob classJob)
{
return classJob switch
{
EExtendedClassJob.Gladiator => [EClassJob.Gladiator],
EExtendedClassJob.Pugilist => [EClassJob.Pugilist],
EExtendedClassJob.Marauder => [EClassJob.Marauder],
EExtendedClassJob.Lancer => [EClassJob.Lancer],
EExtendedClassJob.Archer => [EClassJob.Archer],
EExtendedClassJob.Conjurer => [EClassJob.Conjurer],
EExtendedClassJob.Thaumaturge => [EClassJob.Thaumaturge],
EExtendedClassJob.Carpenter => [EClassJob.Carpenter],
EExtendedClassJob.Blacksmith => [EClassJob.Blacksmith],
EExtendedClassJob.Armorer => [EClassJob.Armorer],
EExtendedClassJob.Goldsmith => [EClassJob.Goldsmith],
EExtendedClassJob.Leatherworker => [EClassJob.Leatherworker],
EExtendedClassJob.Weaver => [EClassJob.Weaver],
EExtendedClassJob.Alchemist => [EClassJob.Alchemist],
EExtendedClassJob.Culinarian => [EClassJob.Culinarian],
EExtendedClassJob.Miner => [EClassJob.Miner],
EExtendedClassJob.Botanist => [EClassJob.Botanist],
EExtendedClassJob.Fisher => [EClassJob.Fisher],
EExtendedClassJob.Paladin => [EClassJob.Paladin],
EExtendedClassJob.Monk => [EClassJob.Monk],
EExtendedClassJob.Warrior => [EClassJob.Warrior],
EExtendedClassJob.Dragoon => [EClassJob.Dragoon],
EExtendedClassJob.Bard => [EClassJob.Bard],
EExtendedClassJob.WhiteMage => [EClassJob.WhiteMage],
EExtendedClassJob.BlackMage => [EClassJob.BlackMage],
EExtendedClassJob.Arcanist => [EClassJob.Arcanist],
EExtendedClassJob.Summoner => [EClassJob.Summoner],
EExtendedClassJob.Scholar => [EClassJob.Scholar],
EExtendedClassJob.Rogue => [EClassJob.Rogue],
EExtendedClassJob.Ninja => [EClassJob.Ninja],
EExtendedClassJob.Machinist => [EClassJob.Machinist],
EExtendedClassJob.DarkKnight => [EClassJob.DarkKnight],
EExtendedClassJob.Astrologian => [EClassJob.Astrologian],
EExtendedClassJob.Samurai => [EClassJob.Samurai],
EExtendedClassJob.RedMage => [EClassJob.RedMage],
EExtendedClassJob.BlueMage => [EClassJob.BlueMage],
EExtendedClassJob.Gunbreaker => [EClassJob.Gunbreaker],
EExtendedClassJob.Dancer => [EClassJob.Dancer],
EExtendedClassJob.Reaper => [EClassJob.Reaper],
EExtendedClassJob.Sage => [EClassJob.Sage],
EExtendedClassJob.Viper => [EClassJob.Viper],
EExtendedClassJob.Pictomancer => [EClassJob.Pictomancer],
EExtendedClassJob.DoW => Enum.GetValues<EClassJob>().Where(x => x.DealsPhysicalDamage()),
EExtendedClassJob.DoM => Enum.GetValues<EClassJob>().Where(x => x.DealsMagicDamage()),
EExtendedClassJob.DoH => Enum.GetValues<EClassJob>().Where(x => x.IsCrafter()),
EExtendedClassJob.DoL => Enum.GetValues<EClassJob>().Where(x => x.IsGatherer()),
_ => throw new ArgumentOutOfRangeException(nameof(classJob), classJob, null)
};
}
}