From 747f16778126c1bca2d1e26bec4c6ca633aff642 Mon Sep 17 00:00:00 2001 From: oliver Date: Tue, 12 May 2015 11:58:56 +0200 Subject: [PATCH] correctly check permissions for parallel Quests (fixes #97) --- controllers/QuestsController.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/QuestsController.inc b/controllers/QuestsController.inc index 813114e1..4fd01982 100644 --- a/controllers/QuestsController.inc +++ b/controllers/QuestsController.inc @@ -193,7 +193,7 @@ { // Previous Quests // One previous Quest has to be solved and no other - // following Quest of ones has to be tried + // following Quest of ones has to be entered // except it is also an previous Quest of the current Quest $solved = false; $tried = false; @@ -209,7 +209,7 @@ foreach($followingQuests as $followingQuest) { // Check following Quest - if($followingQuest['id'] != $quest['id'] && $this->Quests->hasCharacterTriedQuest($followingQuest['id'], $character['id'])) + if($followingQuest['id'] != $quest['id'] && $this->Quests->hasCharacterEnteredQuest($followingQuest['id'], $character['id'])) { $followingFollowingQuests = $this->Quests->getNextQuests($followingQuest['id']); if(!in_array($quest['id'], array_map(function($q) { return $q['id']; }, $followingFollowingQuests)))