mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
47 lines
1.2 KiB
PHP
47 lines
1.2 KiB
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
|
|
class CharRaceList extends BaseType
|
|
{
|
|
public static $type = TYPE_RACE;
|
|
|
|
protected $queryBase = 'SELECT *, 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 addGlobalsToJscript(&$template, $addMask = 0)
|
|
{
|
|
foreach ($this->iterate() as $__)
|
|
$template->extendGlobalData(self::$type, [$this->id => ['name' => $this->getField('name', true)]]);
|
|
}
|
|
|
|
public function addRewardsToJScript(&$ref) { }
|
|
public function renderTooltip() { }
|
|
}
|
|
|
|
?>
|