1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +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

@@ -25,7 +25,7 @@ namespace AIPathfinding
return dynamic_cast<const IQuestObject *>(questInfo.obj)->checkQuest(node->actor->hero);
}
return questInfo.quest->progress == CQuest::NOT_ACTIVE
return questInfo.quest->activeForPlayers.count(node->actor->hero->getOwner())
|| questInfo.quest->checkQuest(node->actor->hero);
}

View File

@@ -25,7 +25,7 @@ TGoalVec CompleteQuest::getAllPossibleSubgoals()
{
TGoalVec solutions;
if(q.quest->progress != CQuest::COMPLETE)
if(!q.quest->isCompleted)
{
logAi->debug("Trying to realize quest: %s", questToString());