mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
- dropped property "names" and changed getField to return localized Fields if specified. Dropped stupid getNameFieldName() in the process as it was now obsolete. - made property "matches" private. Access through getMatches() that will execute the query _only_ when needed (which is basically always anyway (so much for optimization)) SpellList: parsing - ""fixed"" behavior of the amount-switch $l when used on russian text. It has 3 options instead of 2, no idea what the last one is for though - fixed extra leading whitespace occuring when parsing formulas Lang: - removed offset from getMagicShools(), apparently it is unneeded :o Util: - changed the output of formatTime() in the long version to be more correct in layout - initialized values in parseTime() to prevent empty strings returned by formatTime() - added asBin() and asHex() - helper to improve display of bitmasks (Spells are coming!) - update Spell-Effects/Auras and added misc strings to display different MiscValue-content Filter: - removed escapes from $_POST-handler. If the input is erronous it should be corrected/ignored/noted by the $_GET-handler Smarty: - added optinal parameter to saveCache(), loadCache() to better handle filter variables Search: - changed $maxResults to 10 for OpenSearches in an effort to lower execution time and appied limits to all queries - changed result calculation for OpenSearch. It should now stick to it's limit of 10 results for the list - simplified WorldEvent search global.js: - backported function to parse title-tag of dfn-elements into mouseover-tooltips - shortened document.getElementByTagName(x) calls to gE(document, x)
51 lines
1.4 KiB
PHP
51 lines
1.4 KiB
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
class CharClassList extends BaseType
|
|
{
|
|
protected $setupQuery = 'SELECT *, id AS ARRAY_KEY FROM ?_classes WHERE [cond] ORDER BY Id ASC';
|
|
protected $matchQuery = 'SELECT COUNT(1) FROM ?_classes WHERE [cond]';
|
|
|
|
public function getListviewData()
|
|
{
|
|
$data = [];
|
|
|
|
while ($this->iterate())
|
|
{
|
|
$data[$this->id] = array(
|
|
'id' => $this->id,
|
|
'name' => $this->getField('name', true),
|
|
'races' => $this->curTpl['raceMask'],
|
|
'roles' => $this->curTpl['roles'],
|
|
'weapon' => $this->curTpl['weaponTypeMask'],
|
|
'armor' => $this->curTpl['armorTypeMask'],
|
|
'power' => $this->curTpl['powerType'],
|
|
);
|
|
|
|
if ($this->curTpl['expansion'] == 2) // todo: grr, move to db
|
|
$data[$this->id]['hero'] = 1;
|
|
|
|
if ($this->curTpl['expansion'])
|
|
$data[$this->id]['expansion'] = $this->curTpl['expansion'];
|
|
}
|
|
|
|
return $data;
|
|
}
|
|
|
|
public function addGlobalsToJscript(&$refs)
|
|
{
|
|
if (!isset($refs['gClasses']))
|
|
$refs['gClasses'] = [];
|
|
|
|
while ($this->iterate())
|
|
$refs['gClasses'][$this->id] = ['name' => $this->getField('name', true)];
|
|
}
|
|
|
|
public function addRewardsToJScript(&$ref) { }
|
|
public function renderTooltip() { }
|
|
}
|
|
|
|
?>
|