implement CRUD for Charactertypes (resolves issue #319)
This commit is contained in:
parent
a4ccb74e8c
commit
9b05d99391
12 changed files with 493 additions and 30 deletions
|
|
@ -222,7 +222,7 @@
|
|||
throw new \nre\exceptions\AccessDeniedException();
|
||||
}
|
||||
catch(\nre\exceptions\IdNotFoundException $e) {
|
||||
// The should be the case
|
||||
// This should be the case
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -308,6 +308,20 @@
|
|||
// Get XP-levels
|
||||
$xplevels = $this->Characters->getXPLevelsForSeminary($seminary['id']);
|
||||
|
||||
// Get Avatars
|
||||
if(count($xplevels) > 0)
|
||||
{
|
||||
foreach($types as &$type)
|
||||
{
|
||||
try {
|
||||
$type['avatar'] = $this->Avatars->getAvatarByTypeAndLevel($seminary['id'], $type['url'], $xplevels[0]['level']);
|
||||
}
|
||||
catch(\nre\exceptions\IdNotFoundException $e) {
|
||||
// No Avatar available
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Set titile
|
||||
$this->addTitleLocalized('Create Character');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue