add notification for Character titles
This commit is contained in:
parent
edbacf19a8
commit
7d0ff7f569
3 changed files with 20 additions and 1 deletions
|
|
@ -65,7 +65,7 @@
|
||||||
$character['id']
|
$character['id']
|
||||||
);
|
);
|
||||||
|
|
||||||
// Add notifications
|
// Add notification
|
||||||
$this->Notification->addNotification(
|
$this->Notification->addNotification(
|
||||||
\hhu\z\controllers\components\NotificationComponent::TYPE_ACHIEVEMENT,
|
\hhu\z\controllers\components\NotificationComponent::TYPE_ACHIEVEMENT,
|
||||||
$achievement['title'],
|
$achievement['title'],
|
||||||
|
|
@ -130,6 +130,14 @@
|
||||||
$character['id']
|
$character['id']
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Add notification
|
||||||
|
$this->Notification->addNotification(
|
||||||
|
\hhu\z\controllers\components\NotificationComponent::TYPE_CHARACTERTITLE,
|
||||||
|
($character['gender'] === 1)
|
||||||
|
? $title['title_male']
|
||||||
|
: $title['title_female']
|
||||||
|
);
|
||||||
|
|
||||||
// Redirect
|
// Redirect
|
||||||
$this->redirect(
|
$this->redirect(
|
||||||
$this->linker->link(
|
$this->linker->link(
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,12 @@
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const TYPE_CHARACTERGROUPSACHIEVEMENT = 'charactergroupsachievement';
|
const TYPE_CHARACTERGROUPSACHIEVEMENT = 'charactergroupsachievement';
|
||||||
|
/**
|
||||||
|
* Type: Character title
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
const TYPE_CHARACTERTITLE = 'charactertitle';
|
||||||
/**
|
/**
|
||||||
* Type: Level-up
|
* Type: Level-up
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,11 @@
|
||||||
<p class="fwb"><?=$notification['message']?></p>
|
<p class="fwb"><?=$notification['message']?></p>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</li>
|
</li>
|
||||||
|
<?php elseif($notification['type'] == \hhu\z\controllers\components\NotificationComponent::TYPE_CHARACTERTITLE) : ?>
|
||||||
|
<li class="cf">
|
||||||
|
<p class="announce"><i class="fa fa-trophy fa-fw"></i><?=_('Charactertitle')?>:<i class="fa fa-times fa-fw"></i></p>
|
||||||
|
<p class="fwb"><?=$notification['message']?></p>
|
||||||
|
</li>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<li class="cf">
|
<li class="cf">
|
||||||
<img src="<?=$linker->link(array('grafics','lvlup.jpg'))?>">
|
<img src="<?=$linker->link(array('grafics','lvlup.jpg'))?>">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue