show title of Characters whereever their names appear
This commit is contained in:
parent
e99a406a96
commit
56bcf81b4b
9 changed files with 98 additions and 9 deletions
|
|
@ -31,7 +31,7 @@
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public $models = array('seminaries', 'characters', 'characterroles', 'xplevels', 'avatars', 'achievements');
|
||||
public $models = array('seminaries', 'characters', 'characterroles', 'xplevels', 'avatars', 'achievements', 'charactertitles');
|
||||
/**
|
||||
* Current Seminary
|
||||
*
|
||||
|
|
@ -91,6 +91,11 @@
|
|||
catch(\nre\exceptions\IdNotFoundException $e) {
|
||||
// No Avatar available
|
||||
}
|
||||
if(!is_null(self::$character['charactertitle_id']) && !is_null(self::$character['gender']))
|
||||
{
|
||||
$title = $this->Charactertitles->getTitleById(self::$character['charactertitle_id']);
|
||||
self::$character['title'] = $title[(self::$character['gender']) ? 'title_male' : 'title_female'];
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(\nre\exceptions\IdNotFoundException $e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue