FIx server error with not being able to find singular hiddeout craft now there are two DSP crafts

This commit is contained in:
Dev 2023-08-02 12:57:08 +01:00
parent d0531e4b5c
commit 946512ca6d
2 changed files with 6 additions and 5 deletions

View File

@ -157,6 +157,7 @@
"quest-handover_wrong_item": "Unable to hand item in for quest {{questId}}, expected tpl: {{requiredTpl}} but handed in: {{handedInTpl}}", "quest-handover_wrong_item": "Unable to hand item in for quest {{questId}}, expected tpl: {{requiredTpl}} but handed in: {{handedInTpl}}",
"quest-reward_type_not_handled": "Quest reward type: {{rewardType}} not handled for quest: {{questId}} name: {{questName}}", "quest-reward_type_not_handled": "Quest reward type: {{rewardType}} not handled for quest: {{questId}} name: {{questName}}",
"quest-unable_to_find_compare_condition": "Unrecognised Comparison Method: %s", "quest-unable_to_find_compare_condition": "Unrecognised Comparison Method: %s",
"quest-unable_to_find_matching_hideout_production": "Unable to find matching hideout craft unlock for quest: {{questName}}, matches found: {{matchCount}}"
"ragfair-invalid_player_offer_request": "Unable to place offer, request is invalid", "ragfair-invalid_player_offer_request": "Unable to place offer, request is invalid",
"ragfair-missing_barter_scheme": "generateFleaOffersForTrader() Failed to find barterScheme for item id: {{itemId}} tpl: {{tpl}} on {{name}}", "ragfair-missing_barter_scheme": "generateFleaOffersForTrader() Failed to find barterScheme for item id: {{itemId}} tpl: {{tpl}} on {{name}}",
"ragfair-no_trader_assorts_cant_generate_flea_offers": "Unable to generate flea offers for trader %s, no assort found", "ragfair-no_trader_assorts_cant_generate_flea_offers": "Unable to generate flea offers for trader %s, no assort found",
@ -424,7 +425,7 @@
"pmcresponse-victim_plead_22": "I just bought this account, why you kill me", "pmcresponse-victim_plead_22": "I just bought this account, why you kill me",
"pmcresponse-victim_plead_23": "Cheap kill", "pmcresponse-victim_plead_23": "Cheap kill",
"pmcresponse-victim_plead_24": "It is what it is", "pmcresponse-victim_plead_24": "It is what it is",
"pmcresponse-victim_plead_24": "Its so over", "pmcresponse-victim_plead_25": "Its so over",
"pmcresponse-suffix_1": "bro", "pmcresponse-suffix_1": "bro",
"pmcresponse-suffix_2": "bruh", "pmcresponse-suffix_2": "bruh",
"pmcresponse-suffix_3": "lil bro", "pmcresponse-suffix_3": "lil bro",
@ -549,7 +550,7 @@
"pmc-name_prefix_39": "Dank", "pmc-name_prefix_39": "Dank",
"pmc-name_prefix_40": "Goat", "pmc-name_prefix_40": "Goat",
"pmc-name_prefix_41": "Zesty", "pmc-name_prefix_41": "Zesty",
"pmc-name_prefix_41": "Fake", "pmc-name_prefix_42": "Fake",
"launcher-profile_standard": "Same as live, basic stash size (10x28), 500,000 roubles", "launcher-profile_standard": "Same as live, basic stash size (10x28), 500,000 roubles",
"launcher-profile_leftbehind": "Same as Standard plus; larger stash size (10x38), extra equipment/items, 500 dollars", "launcher-profile_leftbehind": "Same as Standard plus; larger stash size (10x38), extra equipment/items, 500 dollars",
"launcher-profile_preparetoescape": "Same as Left Behind plus; larger stash size (10x48), extra equipment/items, higher starting reputation with traders, 250 euros", "launcher-profile_preparetoescape": "Same as Left Behind plus; larger stash size (10x48), extra equipment/items, higher starting reputation with traders, 250 euros",

View File

@ -692,13 +692,13 @@ export class QuestHelper
const hideoutProductions = this.databaseServer.getTables().hideout.production; const hideoutProductions = this.databaseServer.getTables().hideout.production;
const matchingProductions = hideoutProductions.filter(x => const matchingProductions = hideoutProductions.filter(x =>
x.areaType === Number.parseInt(craftUnlockReward.traderId) x.areaType === Number.parseInt(craftUnlockReward.traderId)
//&& x.requirements[0].requiredLevel === craftUnlockReward.loyaltyLevel && x.requirements.some(x => x.requiredLevel === craftUnlockReward.loyaltyLevel)
&& x.endProduct === craftUnlockReward.items[0]._tpl); && x.endProduct === craftUnlockReward.items[0]._tpl);
// More than 1 match, above filtering wasn't strict enough // More/less than 1 match, above filtering wasn't strict enough
if (matchingProductions.length !== 1) if (matchingProductions.length !== 1)
{ {
this.logger.error(this.localisationService.getText(`QUEST ${questDetails.QuestName} ${matchingProductions.length} PRODUCTIONS MATCHES, OH NO`)); this.logger.error(this.localisationService.getText("quest-unable_to_find_matching_hideout_production", {questName: questDetails.QuestName, matchCount: matchingProductions.length}));
return; return;
} }