Update hoq quest trader assorts are handled

This commit is contained in:
Dev 2023-11-22 14:24:58 +00:00
parent 9c238c8eba
commit 7a3fb095c0
3 changed files with 403 additions and 434 deletions

View File

@ -1,385 +1,371 @@
{ {
"647723a2ed3a9d1ca43cbfec": { "647723a2ed3a9d1ca43cbfec": {
"questId": "647710905320c660d91c15a5", "questId": "647710905320c660d91c15a5",
"itemTpl": "5efb0da7a29a85116f6ea05f", "itemTpl": "5efb0da7a29a85116f6ea05f",
"itemUpd": { "itemUpd": {
"BuyRestrictionMax": 150, "BuyRestrictionMax": 150,
"StackObjectsCount": 20000 "StackObjectsCount": 20000
}, },
"barterScheme": [ "barterScheme": [{
{ "count": 700,
"count": 700, "_tpl": "5449016a4bdc2d6f028b456f"
"_tpl": "5449016a4bdc2d6f028b456f" }
} ]
] },
}, "63a235b6f194393ecf632fa3": {
"63a235b6f194393ecf632fa3": { "questId": "63966fbeea19ac7ed845db2e",
"questId": "63966fbeea19ac7ed845db2e", "itemTpl": "6389c7750ef44505c87f5996",
"itemTpl": "6389c7750ef44505c87f5996", "itemUpd": {
"itemUpd": { "BuyRestrictionMax": 1,
"BuyRestrictionMax": 1, "StackObjectsCount": 100
"StackObjectsCount": 100 },
}, "barterScheme": [{
"barterScheme": [ "count": 15,
{ "_tpl": "5d0376a486f7747d8050965c"
"count": 15, }, {
"_tpl": "5d0376a486f7747d8050965c" "count": 10,
}, "_tpl": "57347c2e24597744902c94a1"
{ }, {
"count": 10, "count": 50,
"_tpl": "57347c2e24597744902c94a1" "_tpl": "5c06782b86f77426df5407d2"
}, }, {
{ "count": 5,
"count": 50, "_tpl": "5c05300686f7746dce784e5d"
"_tpl": "5c06782b86f77426df5407d2" }
}, ]
{ },
"count": 5, "63a2359ef194393ecf632fa2": {
"_tpl": "5c05300686f7746dce784e5d" "questId": "63967028c4a91c5cb76abd81",
} "itemTpl": "6389c85357baa773a825b356",
] "itemUpd": {
}, "BuyRestrictionMax": 2,
"63a2359ef194393ecf632fa2": { "StackObjectsCount": 10
"questId": "63967028c4a91c5cb76abd81", },
"itemTpl": "6389c85357baa773a825b356", "barterScheme": [{
"itemUpd": { "count": 20,
"BuyRestrictionMax": 2, "_tpl": "6389c70ca33d8c4cdf4932c6"
"StackObjectsCount": 10 }, {
}, "count": 10,
"barterScheme": [ "_tpl": "5d03775b86f774203e7e0c4b"
{ }, {
"count": 20, "count": 12,
"_tpl": "6389c70ca33d8c4cdf4932c6" "_tpl": "590a386e86f77429692b27ab"
}, }, {
{ "count": 16,
"count": 10, "_tpl": "5c05308086f7746b2101e90b"
"_tpl": "5d03775b86f774203e7e0c4b" }, {
}, "count": 16,
{ "_tpl": "5c05300686f7746dce784e5d"
"count": 12, }
"_tpl": "590a386e86f77429692b27ab" ]
}, },
{ "64764dc585699632555ed176": {
"count": 16, "questId": "64764abcd125ab430a14ccb5",
"_tpl": "5c05308086f7746b2101e90b" "itemTpl": "59e0d99486f7744a32234762",
}, "itemUpd": {
{ "BuyRestrictionMax": 180,
"count": 16, "StackObjectsCount": 650000
"_tpl": "5c05300686f7746dce784e5d" },
} "barterScheme": [{
] "count": 1099,
}, "_tpl": "5449016a4bdc2d6f028b456f"
"64764dc585699632555ed176": { }
"questId": "64764abcd125ab430a14ccb5", ]
"itemTpl": "59e0d99486f7744a32234762", },
"itemUpd": { "5ac6699186f77403de1f5cf1": {
"BuyRestrictionMax": 180, "questId": "597a0f5686f774273b74f676",
"StackObjectsCount": 650000 "itemTpl": "5aa7e4a4e5b5b000137b76f2",
}, "itemUpd": {
"barterScheme": [ "BuyRestrictionMax": 3,
{ "StackObjectsCount": 200
"count": 1099, },
"_tpl": "5449016a4bdc2d6f028b456f" "barterScheme": [{
} "count": 35000,
] "_tpl": "5449016a4bdc2d6f028b456f"
}, }
"5ac6699186f77403de1f5cf1": { ]
"questId": "597a0f5686f774273b74f676", },
"itemTpl": "5aa7e4a4e5b5b000137b76f2", "64bf9e93f2dec80e000e69e8": {
"itemUpd": { "questId": "64b907bd55f4156df8007d14",
"BuyRestrictionMax": 3, "itemTpl": "63a0b2eabea67a6d93009e52",
"StackObjectsCount": 200 "itemUpd": {
}, "BuyRestrictionMax": 5,
"barterScheme": [ "StackObjectsCount": 200
{ },
"count": 35000, "barterScheme": [{
"_tpl": "5449016a4bdc2d6f028b456f" "count": 20000,
} "_tpl": "5449016a4bdc2d6f028b456f"
] }
}, ]
"64bf9e93f2dec80e000e69e8": { },
"questId": "64b907bd55f4156df8007d14", "63a9f74ac31b00242d28a9c8": {
"itemTpl": "63a0b2eabea67a6d93009e52", "questname": "Best Job in the World",
"itemUpd": { "questId": "63a9ae24009ffc6a551631a5",
"BuyRestrictionMax": 5, "itemTpl": "62e7e7bbe6da9612f743f1e0",
"StackObjectsCount": 200 "itemUpd": {
}, "BuyRestrictionMax": 2,
"barterScheme": [ "StackObjectsCount": 50
{ },
"count": 20000, "barterScheme": [{
"_tpl": "5449016a4bdc2d6f028b456f" "count": 1,
} "_tpl": "5c12613b86f7743bbe2c3f76"
] }, {
}, "count": 2,
"63a9f74ac31b00242d28a9c8": { "_tpl": "5d0379a886f77420407aa271"
"questname": "Best Job in the World", }
"questId": "63a9ae24009ffc6a551631a5", ]
"itemTpl": "62e7e7bbe6da9612f743f1e0", },
"itemUpd": { "63a9f750009ffc6a551631d0": {
"BuyRestrictionMax": 2, "questname": "Best Job in the World",
"StackObjectsCount": 50 "questId": "63a9ae24009ffc6a551631a5",
}, "itemTpl": "5656eb674bdc2d35148b457c",
"barterScheme": [ "itemUpd": {
{ "BuyRestrictionMax": 10,
"count": 1, "StackObjectsCount": 60
"_tpl": "5c12613b86f7743bbe2c3f76" },
},{ "barterScheme": [{
"count": 2, "count": 15120,
"_tpl": "5d0379a886f77420407aa271" "_tpl": "5449016a4bdc2d6f028b456f"
} }
] ]
}, },
"63a9f750009ffc6a551631d0": { "6491e75a3feb0c6db85581c7": {
"questname": "Best Job in the World", "questName": "Failed Setup",
"questId": "63a9ae24009ffc6a551631a5", "questId": "64916da7ad4e722c106f2345",
"itemTpl": "5656eb674bdc2d35148b457c", "itemTpl": "6357c98711fb55120211f7e1",
"itemUpd": { "itemUpd": {
"BuyRestrictionMax": 10, "BuyRestrictionMax": 2,
"StackObjectsCount": 60 "StackObjectsCount": 200000
}, },
"barterScheme": [ "barterScheme": [{
{ "count": 55552,
"count": 15120, "_tpl": "5449016a4bdc2d6f028b456f"
"_tpl": "5449016a4bdc2d6f028b456f" }
} ]
] },
}, "6491e7730509dd09725d7066": {
"6491e75a3feb0c6db85581c7": { "questName": "Failed Setup",
"questName": "Failed Setup", "questId": "64916da7ad4e722c106f2345",
"questId": "64916da7ad4e722c106f2345", "itemTpl": "5ede475b549eed7c6d5c18fb",
"itemTpl": "6357c98711fb55120211f7e1", "itemUpd": {
"itemUpd": { "BuyRestrictionMax": 10,
"BuyRestrictionMax": 2, "StackObjectsCount": 2000000
"StackObjectsCount": 200000 },
}, "barterScheme": [{
"barterScheme": [ "count": 12544,
{ "_tpl": "5449016a4bdc2d6f028b456f"
"count": 55552, }
"_tpl": "5449016a4bdc2d6f028b456f" ]
} },
] "62a703ea4de19a4c3422ea67": {
}, "questId": "",
"6491e7730509dd09725d7066": { "itemTpl": "5e85a9f4add9fe03027d9bf1",
"questName": "Failed Setup", "itemUpd": {
"questId": "64916da7ad4e722c106f2345", "BuyRestrictionMax": 10,
"itemTpl": "5ede475b549eed7c6d5c18fb", "StackObjectsCount": 20
"itemUpd": { },
"BuyRestrictionMax": 10, "barterScheme": [{
"StackObjectsCount": 2000000 "count": 3381,
}, "_tpl": "5449016a4bdc2d6f028b456f"
"barterScheme": [ }
{ ]
"count": 12544, },
"_tpl": "5449016a4bdc2d6f028b456f" "649b182a49f5fa538c64e4fb": {
} "questId": "649af47d717cb30e7e4b5e26",
] "itemTpl": "5b2388675acfc4771e1be0be",
}, "itemUpd": {
"62a703ea4de19a4c3422ea67": { "BuyRestrictionMax": 10,
"questId": "", "StackObjectsCount": 20
"itemTpl": "5e85a9f4add9fe03027d9bf1", },
"itemUpd": { "barterScheme": [{
"BuyRestrictionMax": 10, "count": 45000,
"StackObjectsCount": 20 "_tpl": "5449016a4bdc2d6f028b456f"
}, }
"barterScheme": [ ]
{ },
"count": 3381, "649b18300329282a376bda05": {
"_tpl": "5449016a4bdc2d6f028b456f" "questId": "649af47d717cb30e7e4b5e26",
} "itemTpl": "618ba27d9008e4636a67f61d",
] "itemUpd": {
}, "BuyRestrictionMax": 2,
"649b182a49f5fa538c64e4fb": { "StackObjectsCount": 20
"questId": "649af47d717cb30e7e4b5e26", },
"itemTpl": "5b2388675acfc4771e1be0be", "barterScheme": [{
"itemUpd": { "count": 115000,
"BuyRestrictionMax": 10, "_tpl": "5449016a4bdc2d6f028b456f"
"StackObjectsCount": 20 }
}, ]
"barterScheme": [ },
{ "649b1836fb67e3338f540ce5": {
"count": 45000, "questId": "649af47d717cb30e7e4b5e26",
"_tpl": "5449016a4bdc2d6f028b456f" "itemTpl": "5b3b99475acfc432ff4dcbee",
} "itemUpd": {
] "BuyRestrictionMax": 2,
}, "StackObjectsCount": 20
"649b18300329282a376bda05": { },
"questId": "649af47d717cb30e7e4b5e26", "barterScheme": [{
"itemTpl": "618ba27d9008e4636a67f61d", "count": 80000,
"itemUpd": { "_tpl": "5449016a4bdc2d6f028b456f"
"BuyRestrictionMax": 2, }
"StackObjectsCount": 20 ]
}, },
"barterScheme": [ "64bd432d6de7c555ad051726": {
{ "questId": "64b907a85e9b86ab7a08cf0d",
"count": 115000, "itemTpl": "5ac4cd105acfc40016339859",
"_tpl": "5449016a4bdc2d6f028b456f" "itemUpd": {
} "BuyRestrictionMax": 2,
] "StackObjectsCount": 40000
}, },
"649b1836fb67e3338f540ce5": { "barterScheme": [{
"questId": "649af47d717cb30e7e4b5e26", "count": 1,
"itemTpl": "5b3b99475acfc432ff4dcbee", "_tpl": "5d403f9186f7743cac3f229b"
"itemUpd": { }, {
"BuyRestrictionMax": 2, "count": 1,
"StackObjectsCount": 20 "_tpl": "62a0a0bb621468534a797ad5"
}, }
"barterScheme": [ ]
{ },
"count": 80000, "600306ee63625014312be3bb": {
"_tpl": "5449016a4bdc2d6f028b456f" "questName": "Hunter",
} "questId": "649af47d717cb30e7e4b5e26",
] "itemTpl": "5fc22d7c187fea44d52eda44",
}, "itemUpd": {
"64bd432d6de7c555ad051726": { "BuyRestrictionMax": 1,
"questId": "64b907a85e9b86ab7a08cf0d", "StackObjectsCount": 5
"itemTpl": "5ac4cd105acfc40016339859", },
"itemUpd": { "barterScheme": [{
"BuyRestrictionMax": 2, "count": 301068,
"StackObjectsCount": 40000 "_tpl": "5449016a4bdc2d6f028b456f"
}, }
"barterScheme": [ ]
{ },
"count": 1, "63a9d1a4009ffc6a551631b6": {
"_tpl": "5d403f9186f7743cac3f229b" "questName": "Slaughterhouse",
}, "questId": "63a9b36cc31b00242d28a99f",
{ "itemTpl": "63920105a83e15700a00f168",
"count": 1, "itemUpd": {
"_tpl": "62a0a0bb621468534a797ad5" "BuyRestrictionMax": 1,
} "StackObjectsCount": 5
] },
}, "barterScheme": [{
"600306ee63625014312be3bb": { "count": 1,
"questName": "Hunter", "_tpl": "5c010e350db83400232feec7"
"questId": "649af47d717cb30e7e4b5e26", }, {
"itemTpl": "5fc22d7c187fea44d52eda44", "count": 1,
"itemUpd": { "_tpl": "5bffdc370db834001d23eca8"
"BuyRestrictionMax": 1, }, {
"StackObjectsCount": 5 "count": 1,
}, "_tpl": "5bffe7930db834001b734a39"
"barterScheme": [ }
{ ]
"count": 301068, },
"_tpl": "5449016a4bdc2d6f028b456f" "64f8cd7133ff7561c87643f1": {
} "questName": "Ambulances Again",
] "questId": "64f3176921045e77405d63b5",
}, "itemTpl": "5c0e530286f7747fa1419862",
"63a9d1a4009ffc6a551631b6": { "itemUpd": {
"questName": "Slaughterhouse", "StackObjectsCount": 2000
"questId": "63a9b36cc31b00242d28a99f", },
"itemTpl": "63920105a83e15700a00f168", "barterScheme": [{
"itemUpd": { "count": 5,
"BuyRestrictionMax": 1, "_tpl": "57513f07245977207e26a311"
"StackObjectsCount": 5 }
}, ]
"barterScheme": [ },
{ "63a2350cd6d4651e53602b02": {
"count": 1, "questName": "Following the Bread Crumbs",
"_tpl": "5c010e350db83400232feec7" "questId": "639670029113f06a7c3b2377",
}, { "itemTpl": "6389c7f115805221fb410466",
"count": 1, "itemUpd": {
"_tpl": "5bffdc370db834001d23eca8" "BuyRestrictionMax": 1,
}, { "StackObjectsCount": 100
"count": 1, },
"_tpl": "5bffe7930db834001b734a39" "barterScheme": [{
} "count": 15,
] "_tpl": "5d03784a86f774203e7e0c4d"
}, }, {
"64f8cd7133ff7561c87643f1": { "count": 50,
"questName": "Ambulances Again", "_tpl": "5c06779c86f77426e00dd782"
"questId": "64f3176921045e77405d63b5", }, {
"itemTpl": "5c0e530286f7747fa1419862", "count": 10,
"itemUpd": { "_tpl": "590a3efd86f77437d351a25b"
"StackObjectsCount": 2000 }, {
}, "count": 8,
"barterScheme": [ "_tpl": "5c052f6886f7746b1e3db148"
{ }
"count": 5, ]
"_tpl": "57513f07245977207e26a311" },
} "64f8d0b1c8626c7d46040668": {
] "questName": "Huntsman Path Big Game",
}, "questId": "64e7b971f9d6fa49d6769b44",
"63a2350cd6d4651e53602b02": { "itemTpl": "63fc44e2429a8a166c7f61e6",
"questName": "Following the Bread Crumbs", "itemUpd": {
"questId": "639670029113f06a7c3b2377", "BuyRestrictionMax": 1,
"itemTpl": "6389c7f115805221fb410466", "StackObjectsCount": 2000
"itemUpd": { },
"BuyRestrictionMax": 1, "barterScheme": [{
"StackObjectsCount": 100 "count": 1,
}, "_tpl": "63fc44e2429a8a166c7f61e6"
"barterScheme": [ }
{ ]
"count": 15, },
"_tpl": "5d03784a86f774203e7e0c4d" "64f8c9f67e981f7f0110d507": {
}, { "questName": "Gendarmerie - Mall Cop",
"count": 50, "questId": "64e7b99017ab941a6f7bf9d7",
"_tpl": "5c06779c86f77426e00dd782" "itemTpl": "59f98b4986f7746f546d2cef",
}, { "itemUpd": {
"count": 10, "BuyRestrictionMax": 1,
"_tpl": "590a3efd86f77437d351a25b" "StackObjectsCount": 100
}, { },
"count": 8, "barterScheme": [{
"_tpl": "5c052f6886f7746b1e3db148" "count": 4,
} "_tpl": "6389c6463485cf0eeb260715"
] }
}, ]
"64f8d0b1c8626c7d46040668": { },
"questName": "Huntsman Path Big Game", "6491e72ff8040d427a3a5c26": {
"questId": "64e7b971f9d6fa49d6769b44", "questName": "Failed Setup",
"itemTpl": "63fc44e2429a8a166c7f61e6", "questId": "64916da7ad4e722c106f2345",
"itemUpd": { "itemTpl": "62e7e7bbe6da9612f743f1e0",
"BuyRestrictionMax": 1, "itemUpd": {
"StackObjectsCount": 2000 "BuyRestrictionMax": 2,
}, "StackObjectsCount": 20000
"barterScheme": [ },
{ "barterScheme": [{
"count": 1, "count": 45607,
"_tpl": "63fc44e2429a8a166c7f61e6" "_tpl": "5449016a4bdc2d6f028b456f"
} }
] ]
}, },
"64f8c9f67e981f7f0110d507": { "6491e749ad4e722c106f2348": {
"questName": "Gendarmerie - Mall Cop", "questName": "Failed Setup",
"questId": "64e7b99017ab941a6f7bf9d7", "questId": "64916da7ad4e722c106f2345",
"itemTpl": "59f98b4986f7746f546d2cef", "itemTpl": "5656eb674bdc2d35148b457c",
"itemUpd": { "itemUpd": {
"BuyRestrictionMax": 1, "BuyRestrictionMax": 5,
"StackObjectsCount": 100 "StackObjectsCount": 250
}, },
"barterScheme": [ "barterScheme": [{
{ "count": 9000,
"count": 4, "_tpl": "5449016a4bdc2d6f028b456f"
"_tpl": "6389c6463485cf0eeb260715" }
} ]
] },
}, "64f8c9a67d39ff0e7624cd69": {
"6491e72ff8040d427a3a5c26": { "questName": "Gendarmerie Tickets Please",
"questName": "Failed Setup", "questId": "64e7b9a4aac4cd0a726562cb",
"questId": "64916da7ad4e722c106f2345", "itemTpl": "62e14904c2699c0ec93adc47",
"itemTpl": "62e7e7bbe6da9612f743f1e0", "itemUpd": {
"itemUpd": { "BuyRestrictionMax": 4,
"BuyRestrictionMax": 2, "StackObjectsCount": 20000
"StackObjectsCount": 20000 },
}, "barterScheme": [{
"barterScheme": [ "count": 1,
{ "_tpl": "619cbfeb6b8a1b37a54eebfa"
"count": 45607, }, {
"_tpl": "5449016a4bdc2d6f028b456f" "count": 1,
} "_tpl": "619cbfccbedcde2f5b3f7bdd"
] }
}, ]
"6491e749ad4e722c106f2348": { }
"questName": "Failed Setup", }
"questId": "64916da7ad4e722c106f2345",
"itemTpl": "5656eb674bdc2d35148b457c",
"itemUpd": {
"BuyRestrictionMax": 5,
"StackObjectsCount": 250
},
"barterScheme": [
{
"count": 9000,
"_tpl": "5449016a4bdc2d6f028b456f"
}
]
}
}

View File

@ -30,7 +30,7 @@ namespace AssortGenerator.Common.Helpers
{ {
var questFilePath = InputFileHelper.GetInputFilePaths().FirstOrDefault(x => x.Contains("quests.json")); var questFilePath = InputFileHelper.GetInputFilePaths().FirstOrDefault(x => x.Contains("quests.json"));
var questDataJson = File.ReadAllText(questFilePath); var questDataJson = File.ReadAllText(questFilePath);
var finalisedQuestData = JsonSerializer.Deserialize<Dictionary<string, Quest>> (questDataJson); var finalisedQuestData = JsonSerializer.Deserialize<Dictionary<string, Quest>>(questDataJson);
var jsondoc = JsonDocument.Parse(questDataJson); var jsondoc = JsonDocument.Parse(questDataJson);
var root = jsondoc.RootElement; var root = jsondoc.RootElement;
@ -50,58 +50,46 @@ namespace AssortGenerator.Common.Helpers
return jsondoc; return jsondoc;
} }
public static List<AssortUnlocks> GetAssortUnlocks() public static List<AssortUnlocks> GetAssortUnlocks(Dictionary<string, Quest> questData)
{ {
if (_assortUnlocks == null) if (_assortUnlocks == null)
{ {
_assortUnlocks = new List<AssortUnlocks>(); _assortUnlocks = new List<AssortUnlocks>();
foreach (var quest in GetQuestData().data) foreach (var quest in questData.Values)
{ {
// debut foreach (var reward in quest.rewards.Success.Where(x => string.Equals(x.type, "assortmentunlock", System.StringComparison.OrdinalIgnoreCase)))
if (quest._id == "5936d90786f7742b1420ba5b")
{ {
var x = 2; _assortUnlocks.Add(new AssortUnlocks
}
foreach (var reward in quest.rewards.Success)
{
if (string.Equals(reward.type, "assortmentunlock", System.StringComparison.OrdinalIgnoreCase))
{ {
_assortUnlocks.Add(new AssortUnlocks AssortUnlockId = reward.id,
{ ItemUnlockedId = reward.target,
AssortUnlockId = reward.id, ItemUnlockedTemplateId = reward.items[0]._tpl,
ItemUnlockedId = reward.target, LoyaltyLevel = (int)reward.loyaltyLevel,
ItemUnlockedTemplateId = reward.items[0]._tpl, QuestId = quest._id,
LoyaltyLevel = (int)reward.loyaltyLevel, QuestRewardId = reward.id,
QuestId = quest._id, TraderId = reward.traderId,
QuestRewardId = reward.id, TraderType = TraderHelper.GetTraderTypeById(reward.traderId),
TraderId = reward.traderId, Criteria = "Success",
TraderType = TraderHelper.GetTraderTypeById(reward.traderId), Items = reward.items
Criteria = "Success",
Items = reward.items
}
);
} }
);
} }
foreach (var reward in quest.rewards.Started) foreach (var reward in quest.rewards.Started.Where(x => string.Equals(x.type, "assortmentunlock", System.StringComparison.OrdinalIgnoreCase)))
{ {
if (string.Equals(reward.type, "assortmentunlock", System.StringComparison.OrdinalIgnoreCase)) _assortUnlocks.Add(new AssortUnlocks
{ {
_assortUnlocks.Add(new AssortUnlocks AssortUnlockId = reward.id,
{ ItemUnlockedId = reward.target,
AssortUnlockId = reward.id, ItemUnlockedTemplateId = reward.items[0]._tpl,
ItemUnlockedId = reward.target, LoyaltyLevel = (int)reward.loyaltyLevel,
ItemUnlockedTemplateId = reward.items[0]._tpl, QuestId = quest._id,
LoyaltyLevel = (int)reward.loyaltyLevel, QuestRewardId = reward.id,
QuestId = quest._id, TraderId = reward.traderId,
QuestRewardId = reward.id, TraderType = TraderHelper.GetTraderTypeById(reward.traderId),
TraderId = reward.traderId, Criteria = "Started",
TraderType = TraderHelper.GetTraderTypeById(reward.traderId), Items = reward.items
Criteria = "Started",
Items = reward.items
}
);
} }
);
} }
} }
} }
@ -125,7 +113,7 @@ namespace AssortGenerator.Common.Helpers
{ {
public string questId { get; set; } public string questId { get; set; }
public string itemTpl { get; set; } public string itemTpl { get; set; }
public List<Models.Output.Item> items { get;set;} public List<Models.Output.Item> items { get; set; }
public Upd itemUpd { get; set; } public Upd itemUpd { get; set; }
public List<BarterObject> barterScheme { get; set; } public List<BarterObject> barterScheme { get; set; }
} }

View File

@ -299,7 +299,7 @@ namespace AssortGenerator
private static void UpdateQuestAssortUnlockIds(string traderId, QuestAssort traderQuestAssort, Dictionary<string, Quest> finalisedQuestData, AssortRoot traderAssortRoot) private static void UpdateQuestAssortUnlockIds(string traderId, QuestAssort traderQuestAssort, Dictionary<string, Quest> finalisedQuestData, AssortRoot traderAssortRoot)
{ {
var alreadyMatchedAssortIds = new List<string>(); var alreadyMatchedAssortIds = new List<string>();
var assortUnlocks = QuestHelper.GetAssortUnlocks().Where(x => x.TraderId == traderId); var assortUnlocks = QuestHelper.GetAssortUnlocks(finalisedQuestData).Where(x => x.TraderId == traderId);
foreach (var assort in assortUnlocks) foreach (var assort in assortUnlocks)
{ {
// Find quest that matches quest assort key // Find quest that matches quest assort key
@ -392,21 +392,16 @@ namespace AssortGenerator
missingQuestAssorts = new List<AssortUnlocks>(); missingQuestAssorts = new List<AssortUnlocks>();
var result = new QuestAssort(); var result = new QuestAssort();
var questData = QuestHelper.GetQuestData(); var questData = QuestHelper.GetFinalisedQuestData();
// Find assort unlocks // Find assort unlocks
List<AssortUnlocks> assortUnlocks = QuestHelper.GetAssortUnlocks(); List<AssortUnlocks> assortUnlocks = QuestHelper.GetAssortUnlocks(questData);
// Store already matched items // Store already matched items
var matchedAssortItemIds = new List<string>(); var matchedAssortItemIds = new List<string>();
int unknownCount = 1; int unknownCount = 1;
foreach (var assortUnlock in assortUnlocks.Where(x => x.TraderType == trader)) foreach (var assortUnlock in assortUnlocks.Where(x => x.TraderType == trader))
{ {
if (assortUnlock.QuestId == "64f83bcdde58fc437700d8fa")
{
var x = 2;
}
// Get unlock item details // Get unlock item details
var assortItemDetailsDB = ItemTemplateHelper.Items.FirstOrDefault(x => x.Key == assortUnlock.ItemUnlockedTemplateId); var assortItemDetailsDB = ItemTemplateHelper.Items.FirstOrDefault(x => x.Key == assortUnlock.ItemUnlockedTemplateId);
var ItemName = assortItemDetailsDB.Value._name; var ItemName = assortItemDetailsDB.Value._name;