Files
aowow/includes/types/charrace.class.php
Sarjuuk 7af4931b58 implemented details, lists and filters on quests
- some filter are still missing
 - didn't bother with the mapper yet
 - zoneOrSort is still inconsistent for instances

 - merged all queststarter/-ender into one single table
 - removed $template-parameter from addGlobalsToJscript and access it through Util
 - dropped error.tpl and 404.tpl and moved the error-text to aowow_articles
 - misc improvements here and there
2014-04-05 22:04:27 +02:00

48 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';
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($addMask = 0)
{
foreach ($this->iterate() as $__)
Util::$pageTemplate->extendGlobalData(self::$type, [$this->id => ['name' => $this->getField('name', true)]]);
}
public function addRewardsToJScript(&$ref) { }
public function renderTooltip() { }
}
?>