Fix: return the found quest
This commit is contained in:
parent
1fc35881d8
commit
249730ee65
@ -297,11 +297,12 @@ export class QuestController
|
|||||||
{
|
{
|
||||||
for (const repeatableQuest of pmcData.RepeatableQuests)
|
for (const repeatableQuest of pmcData.RepeatableQuests)
|
||||||
{
|
{
|
||||||
const result = repeatableQuest.activeQuests.find(x => x._id === acceptedQuest.qid);
|
const matchingQuest = repeatableQuest.activeQuests.find(x => x._id === acceptedQuest.qid);
|
||||||
if (result)
|
if (matchingQuest)
|
||||||
{
|
{
|
||||||
this.logger.debug(`Accepted repeatable quest ${acceptedQuest.qid} from ${repeatableQuest.name}`);
|
this.logger.debug(`Accepted repeatable quest ${acceptedQuest.qid} from ${repeatableQuest.name}`);
|
||||||
break;
|
|
||||||
|
return matchingQuest;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user