Files
aowow/includes/types/charrace.class.php
Sarjuuk 392610b899 Icons
* add icon to infobox for db types with icon (*duh!*)
 * fixed a couple issues with markup icondb in the process
 * fixed wrong data display due to shared name fields on joined table
2018-12-14 23:09:32 +01:00

53 lines
1.3 KiB
PHP

<?php
if (!defined('AOWOW_REVISION'))
die('illegal access');
class CharRaceList extends BaseType
{
public static $type = TYPE_RACE;
public static $brickFile = 'race';
public static $dataTable = '?_races';
protected $queryBase = 'SELECT r.*, id AS ARRAY_KEY FROM ?_races r';
public function getListviewData()
{
$data = [];
foreach ($this->iterate() as $__)
{
$data[$this->id] = array(
'id' => $this->id,
'name' => $this->getField('name', true),
'classes' => $this->curTpl['classMask'],
'faction' => $this->curTpl['factionId'],
'leader' => $this->curTpl['leader'],
'zone' => $this->curTpl['startAreaId'],
'side' => $this->curTpl['side']
);
if ($this->curTpl['expansion'])
$data[$this->id]['expansion'] = $this->curTpl['expansion'];
}
return $data;
}
public function getJSGlobals($addMask = 0)
{
$data = [];
foreach ($this->iterate() as $__)
$data[TYPE_RACE][$this->id] = ['name' => $this->getField('name', true)];
return $data;
}
public function addRewardsToJScript(&$ref) { }
public function renderTooltip() { }
}
?>