mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
Fix issue with completing a quest
Altered `addTimeLockedQuestsToProfile()` to not fail when checked quest has no `target` property Altered `getNewlyAccessibleQuestsWhenStartingQuest()` to check all statuses of quest, not just first
This commit is contained in:
parent
2de4164a93
commit
d3afe0b6f3
@ -640,7 +640,7 @@ export class QuestController
|
||||
{
|
||||
// If quest has prereq of completed quest + availableAfter value > 0 (quest has wait time)
|
||||
const nextQuestWaitCondition = quest.conditions.AvailableForStart.find((x) =>
|
||||
x.target.includes(completedQuestId) && x.availableAfter > 0
|
||||
x.target?.includes(completedQuestId) && x.availableAfter > 0
|
||||
);
|
||||
if (nextQuestWaitCondition)
|
||||
{
|
||||
|
@ -412,8 +412,8 @@ export class QuestHelper
|
||||
const acceptedQuestCondition = quest.conditions.AvailableForStart.find((x) =>
|
||||
{
|
||||
return x.conditionType === "Quest"
|
||||
&& x.target.includes(startedQuestId)
|
||||
&& x.status[0] === QuestStatus.Started;
|
||||
&& x.target?.includes(startedQuestId)
|
||||
&& x.status?.includes(QuestStatus.Started);
|
||||
});
|
||||
|
||||
// Not found, skip quest
|
||||
|
Loading…
x
Reference in New Issue
Block a user