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)
|
// If quest has prereq of completed quest + availableAfter value > 0 (quest has wait time)
|
||||||
const nextQuestWaitCondition = quest.conditions.AvailableForStart.find((x) =>
|
const nextQuestWaitCondition = quest.conditions.AvailableForStart.find((x) =>
|
||||||
x.target.includes(completedQuestId) && x.availableAfter > 0
|
x.target?.includes(completedQuestId) && x.availableAfter > 0
|
||||||
);
|
);
|
||||||
if (nextQuestWaitCondition)
|
if (nextQuestWaitCondition)
|
||||||
{
|
{
|
||||||
|
@ -412,8 +412,8 @@ export class QuestHelper
|
|||||||
const acceptedQuestCondition = quest.conditions.AvailableForStart.find((x) =>
|
const acceptedQuestCondition = quest.conditions.AvailableForStart.find((x) =>
|
||||||
{
|
{
|
||||||
return x.conditionType === "Quest"
|
return x.conditionType === "Quest"
|
||||||
&& x.target.includes(startedQuestId)
|
&& x.target?.includes(startedQuestId)
|
||||||
&& x.status[0] === QuestStatus.Started;
|
&& x.status?.includes(QuestStatus.Started);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Not found, skip quest
|
// Not found, skip quest
|
||||||
|
Loading…
x
Reference in New Issue
Block a user