1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Refactor quests progress

This commit is contained in:
nordsoft
2023-10-11 21:10:42 +02:00
parent 22c9eecd7d
commit 7ccd4cdcb2
7 changed files with 38 additions and 30 deletions

View File

@ -152,7 +152,7 @@ void CQuestLog::recreateLabelList()
if (quests[i].quest->questName == CQuest::missionName(0))
continue;
if (quests[i].quest->progress == CQuest::COMPLETE)
if (quests[i].quest->isCompleted)
{
completeMissing = false;
if (hideComplete)
@ -180,7 +180,7 @@ void CQuestLog::recreateLabelList()
labels.push_back(label);
// Select latest active quest
if (quests[i].quest->progress != CQuest::COMPLETE)
if(!quests[i].quest->isCompleted)
selectQuest(i, currentLabel);
currentLabel = static_cast<int>(labels.size());