Do not send timelocked quests to client until timer is passed
This commit is contained in:
parent
117c965948
commit
8edc43e9de
@ -135,6 +135,20 @@ export class QuestController
|
|||||||
haveCompletedPreviousQuest = false;
|
haveCompletedPreviousQuest = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Has a wait timer
|
||||||
|
if (conditionToFulfil._props.availableAfter > 0)
|
||||||
|
{
|
||||||
|
// Compare current time to unlock time for previous quest
|
||||||
|
const previousQuestCompleteTime = prerequisiteQuest.statusTimers[prerequisiteQuest.status];
|
||||||
|
const unlockTime = previousQuestCompleteTime + conditionToFulfil._props.availableAfter;
|
||||||
|
if (unlockTime > this.timeUtil.getTimestamp())
|
||||||
|
{
|
||||||
|
this.logger.debug(`Quest ${quest.QuestName} is locked for another ${unlockTime - this.timeUtil.getTimestamp()} seconds`);
|
||||||
|
haveCompletedPreviousQuest = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Previous quest not completed, skip
|
// Previous quest not completed, skip
|
||||||
|
Loading…
Reference in New Issue
Block a user