aowow/pages/itemsets.php
Sarjuuk 1142220674 Filters:
- make offset optional, when converting list to mask

Items:
- fixed display of inventory type for robes and ranged weapons

Spells:
- parsing: $charLevel and $interactive are now properties of spell.
- parsing: fixed durations, passing the time-unit seperately to allow for evaluation of the actual value
- parsing: fixed gender-specific formating [ >male/female< to <male/female>]
- parsing: usage of is_numeric() instead of (float) as 0 is a fucking valid numeric (caused some formulas to not be evaluated *grrr*)
- parsing: lastValue-references now skip to the next previous \d instead of being stopped by random \w (like time units)
- implemented forgotten display of runes for spellCost
- fixed castTimes for most hunter shots (they are -1000 for some reason)
- fixed display of required stances (sometimes they are not actually required but show, when you are _allowed_ to use a spell in certain forms)
- improved formating of tooltips-js (no visual change)

ListViews:
- pass '_truncated' separately. there are nough cases in which 'note' gets send without truncated results

misc changes here and there
2013-04-20 16:16:29 +02:00

68 lines
2.2 KiB
PHP

<?php
if (!defined('AOWOW_REVISION'))
die('illegal access');
require 'includes/class.filter.php';
$filter = [];
$path = [0, 2];
$filterHash = !empty($_GET['filter']) ? sha1(serialize($_GET['filter'])) : -1;
$cacheKey = implode('_', [CACHETYPE_PAGE, TYPE_ITEMSET, -1, $filterHash, User::$localeId]);
if (!$smarty->loadCache($cacheKey, $pageData))
{
$itemsets = new ItemsetList([], true); // class selection is via filter, nothing applies here
$itemsets->addGlobalsToJscript($pageData);
// recreate form selection
$filter['query'] = isset($_GET['filter']) ? $_GET['filter'] : NULL;
$filter['setCr'] = $itemsets->filterGetSetCriteria();
$filter = array_merge($itemsets->filterGetForm(), $filter);
if (isset($filter['cl']))
$path[] = $filter['cl'];
// listview content
$pageData['data'] = $itemsets->getListviewData();
$pageData['params'] = ['tabs' => false];
// create note if search limit was exceeded
if ($itemsets->matches > $AoWoWconf['sqlLimit'])
{
$pageData['params']['note'] = '$'.sprintf(Util::$filterResultString, 'LANG.lvnote_itemsetsfound', $itemsets->matches, $AoWoWconf['sqlLimit']);
$pageData['params']['_truncated'] = 1;
}
if ($itemsets->filterGetError())
$pageData['params']['_errors'] = '$1';
$smarty->saveCache($cacheKey, $pageData);
}
$page = array(
'tab' => 0, // for g_initHeader($tab)
'subCat' => $pageParam ? '='.$pageParam : '',
'title' => ucFirst(Lang::$game['itemsets']),
'path' => json_encode($path, JSON_NUMERIC_CHECK),
'reqJS' => array(
array('path' => 'template/js/filters.js', 'conditional' => false),
array('path' => '?data=weight-presets', 'conditional' => false),
)
);
// sort for dropdown-menus
asort(Lang::$itemset['notes'], SORT_NATURAL);
asort(Lang::$game['cl']);
$smarty->updatePageVars($page);
$smarty->assign('filter', $filter);
$smarty->assign('lang', array_merge(Lang::$main, Lang::$game, Lang::$itemset, Lang::$item));
$smarty->assign('mysql', DB::Aowow()->getStatistics());
$smarty->assign('lvData', $pageData);
$smarty->display('itemsets.tpl');
?>