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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user