check XP-level for user?s Character listing

This commit is contained in:
coderkun 2014-07-31 14:28:56 +02:00
commit 355afb1e20
2 changed files with 8 additions and 1 deletions

View file

@ -119,7 +119,12 @@
$character['characterroles'] = array_map(function($a) { return $a['name']; }, $character['characterroles']);
// Level
$character['xplevel'] = $this->Xplevels->getXPLevelById($character['xplevel_id']);
try {
$character['xplevel'] = $this->Xplevels->getXPLevelById($character['xplevel_id']);
}
catch(\nre\Exceptions\IdNotFoundException $e) {
// No XP-level
}
// Avatar
$avatar = $this->Avatars->getAvatarById($character['avatar_id']);