Files
aowow/includes/class.charclass.php
Sarjuuk edd0ff5209 search: initial implementation
currently searchable are:
 - classes
 - races
 - titles
 - currencies
 - items
 - itemsets
 - achievements

directly or as &opensearch

&json is yet to come, yes that means ?compare cant find any items
2013-03-05 22:28:15 +01:00

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->names[$this->Id],
'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] = Util::jsEscape($this->names[$this->Id]);
}
public function addRewardsToJScript(&$ref) { }
public function renderTooltip() { }
}
?>