show only unlocked Questsgroups and Quests and summarize XPs recursive regarding choosed path by character
This commit is contained in:
parent
925a6b9ae3
commit
40c1ecca50
10 changed files with 317 additions and 176 deletions
|
|
@ -103,6 +103,16 @@
|
|||
// Get additional data
|
||||
foreach($hierarchy['questgroups'] as $i => &$questgroup)
|
||||
{
|
||||
// Check permission of Questgroups
|
||||
if($i >= 1)
|
||||
{
|
||||
if(!$this->Questgroups->hasCharacterSolvedQuestgroup($hierarchy['questgroups'][$i-1]['id'], $character['id']))
|
||||
{
|
||||
$hierarchy['questgroups'] = array_slice($hierarchy['questgroups'], 0, $i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Get first Questgroup text
|
||||
$text = $this->Questgroups->getFirstQuestgroupText($questgroup['id']);
|
||||
if(!empty($text))
|
||||
|
|
@ -114,11 +124,6 @@
|
|||
// Get Character XPs
|
||||
$hierarchy['questgroups'][$i]['character_xps'] = $this->Questgroups->getAchievedXPsForQuestgroup($questgroup['id'], $character['id']);
|
||||
|
||||
// Check permission of Questgroups
|
||||
if($i >= 1) {
|
||||
$questgroup['access'] = $this->Questgroups->hasCharacterSolvedQuestgroup($hierarchy['questgroups'][$i-1]['id'], $character['id']);
|
||||
}
|
||||
|
||||
// Get Media
|
||||
$questgroup['picture'] = null;
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue