search for the first text of a Questgroup recursively (Issue #77)

This commit is contained in:
coderkun 2014-04-27 03:50:25 +02:00
commit 0294040063
3 changed files with 53 additions and 16 deletions

View file

@ -34,6 +34,24 @@
/**
* Get the first text of a Quest.
*
* @param int $questId ID of a Quest
* @return string First text of this Quest or NULL
*/
public function getFirstQuestText($questId)
{
$prolog = $this->getQuesttextsOfQuest($questId, 'Prolog');
if(!empty($prolog)) {
return $prolog[0]['text'];
}
return null;
}
/**
* Get all Questtexts for a Quest.
*