Updatd findAndAddHideoutProductionIdToProfile() to take into account bsg no longer storing the quest id in the productions requirement

This commit is contained in:
Dev 2024-11-01 20:06:19 +00:00
parent 4dff2bbe49
commit 9fe28edbe4
2 changed files with 3 additions and 1 deletions

View File

@ -1038,7 +1038,8 @@ export class QuestHelper {
const matchingProductions = hideoutProductions.recipes.filter(
(prod) =>
prod.areaType === Number.parseInt(craftUnlockReward.traderId) &&
prod.requirements.some((requirement) => requirement.questId === questDetails._id) &&
//prod.requirements.some((requirement) => requirement.questId === questDetails._id) && // BSG dont store the quest id in requirement any more!
prod.requirements.some((requirement) => requirement.type === "QuestComplete") &&
prod.requirements.some((x) => x.requiredLevel === craftUnlockReward.loyaltyLevel) &&
prod.endProduct === craftUnlockReward.items[0]._tpl,
);

View File

@ -20,6 +20,7 @@ export interface IHideoutProduction {
continuous: boolean;
count: number;
productionLimitCount: number;
isCodeProduction: boolean;
}
export interface IRequirement extends IRequirementBase {