Files
aowow/pages/skills.php
Sarjuuk 819a46ae15 detail page for events (with not much in it)
detail and listview for NPCs (without spawns, spells and some filters)
forcing the template to be more generic

- noticed, that the loot display is off. It happens with different modes
  on a creature, that has the same loot but different chances or quantities
  ... analyzing
2014-02-08 12:22:08 +01:00

58 lines
1.4 KiB
PHP

<?php
if (!defined('AOWOW_REVISION'))
die('illegal access');
$cat = Util::extractURLParams($pageParam)[0];
$path = [0, 14];
$title = [Util::ucFirst(Lang::$game['skills'])];
$cacheKey = implode('_', [CACHETYPE_PAGE, TYPE_SKILL, -1, $cat ? $cat : -1, User::$localeId]);
$validCats = [-6, -5, -4, 6, 8, 9, 10, 11];
if (!Util::isValidPage($validCats, $cat))
$smarty->error();
if (!$smarty->loadCache($cacheKey, $pageData))
{
$conditions = [['categoryId', 12, '!']]; // DND
if ($cat)
{
$conditions[] = ['typeCat', $cat];
$path[] = $cat;
array_unshift($title, Lang::$skill['cat'][$cat]);
}
$skills = new SkillList($conditions);
$pageData = array(
'title' => $title,
'path' => $path,
'listviews' => array(
array(
'file' => 'skill',
'data' => $skills->getListviewData(),
'params' => []
)
)
);
$smarty->saveCache($cacheKey, $pageData);
}
// menuId 14: Skill g_initPath()
// tabId 0: Database g_initHeader()
$smarty->updatePageVars(array(
'title' => implode(' - ', $title),
'path' => json_encode($path, JSON_NUMERIC_CHECK),
'tab' => 0
));
$smarty->assign('lang', Lang::$main);
$smarty->assign('lvData', $pageData);
// load the page
$smarty->display('list-page-generic.tpl');
?>