check availability of Avatar at various places
This commit is contained in:
parent
b1a92bcd03
commit
13cd80f436
8 changed files with 23 additions and 4 deletions
|
|
@ -103,6 +103,12 @@
|
|||
foreach($this->Seminarycharacterfields->getFieldsForCharacter($character['id']) as $value) {
|
||||
$character['characterfields'][$value['url']] = $value;
|
||||
}
|
||||
try {
|
||||
$character['avatar'] = $this->Avatars->getAvatarByTypeAndLevel($seminary['id'], $character['charactertype_url'], $character['xplevel']['level']);
|
||||
}
|
||||
catch(\nre\exceptions\IdNotFoundException $e) {
|
||||
// No Avatar available
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public $models = array('seminaries', 'users', 'characterroles', 'charactertypes', 'questgroupshierarchy', 'questgroups', 'questgrouptexts', 'media');
|
||||
public $models = array('seminaries', 'users', 'characterroles', 'charactertypes', 'xplevels', 'questgroupshierarchy', 'questgroups', 'questgrouptexts', 'media');
|
||||
/**
|
||||
* Required components
|
||||
*
|
||||
|
|
@ -76,6 +76,7 @@
|
|||
$seminary['description'] = $description.(strlen($description) < strlen($seminary['description']) ? ' …' : null);
|
||||
$seminary['creator'] = $this->Users->getUserById($seminary['created_user_id']);
|
||||
$seminary['charactertypes'] = $this->Charactertypes->getCharacterTypesForSeminary($seminary['id']);
|
||||
$seminary['xplevels'] = $this->Xplevels->getXPLevelsForSeminary($seminary['id']);
|
||||
|
||||
// Character of currently logged-in user
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@
|
|||
if(is_null($character)) {
|
||||
return;
|
||||
}
|
||||
$character['xplevel'] = $this->Xplevels->getXPLevelById($character['xplevel_id']);
|
||||
$character['rank'] = $this->Characters->getXPRank($seminary['id'], $character['xps']);
|
||||
|
||||
// Get “last” Quest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue