Files
aowow/pages/skills.php
Sarjuuk 08717c36d0 Templates/Listviews
* removed most templates by sensibly restructuring lvTab-data. Util::toJSON() does the rest.
 * taught Util::toJSON() to recognize values prefixed with $ as js-code
 * use Util::toJSON whenever possible
 * misc
   - mail attachments are displyed again
   - always show all currency rewards on Quest-LVs
   - suppress an error, when encountering unused ItemMods
2016-02-11 22:14:42 +01:00

58 lines
1.4 KiB
PHP

<?php
if (!defined('AOWOW_REVISION'))
die('illegal access');
// menuId 14: Skill g_initPath()
// tabId 0: Database g_initHeader()
class SkillsPage extends GenericPage
{
use ListPage;
protected $type = TYPE_SKILL;
protected $tpl = 'list-page-generic';
protected $path = [0, 14];
protected $tabId = 0;
protected $mode = CACHE_TYPE_PAGE;
protected $validCats = [-6, -5, -4, 6, 7, 8, 9, 10, 11];
public function __construct($pageCall, $pageParam)
{
$this->getCategoryFromUrl($pageParam);;
parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::game('skills'));
}
protected function generateContent()
{
$conditions = [];
if (!User::isInGroup(U_GROUP_EMPLOYEE))
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
if ($this->category)
$conditions[] = ['typeCat', $this->category[0]];
$skills = new SkillList($conditions);
$this->lvTabs[] = ['skill', ['data' => array_values($skills->getListviewData())]];
}
protected function generateTitle()
{
if ($this->category)
array_unshift($this->title, Lang::skill('cat', $this->category[0]));
}
protected function generatePath()
{
if ($this->category)
$this->path[] = $this->category[0];
}
}
?>