Files
aowow/includes/class.charrace.php
Sarjuuk cbd27c67b3 Types:
- added some more lasses for (for now) static use

Achievements:
 - moved setup to separate file (not included yet (and shouldn't have been))
 - unified use of the infobox.tpl

Items:
 - Tooltip-layout changes, when used as standalone or incorporated in other tooltips. This can now be considered.

Util:
 - added utf8-safe Util::ucFirst()
 - added Lang::getRequiredItems() for use with spell - equippedItem[Sub]Class

Templates:
 - minor wording fix (link -> links)

Markup:
 - [class=X], [race=X], [money=X] added (i really shouldn't have done this)
 - [color=X] now also accepts r1 - r4 as parameter

obligatory minor stuff here and there
2013-05-13 00:24:30 +02:00

48 lines
1.3 KiB
PHP

<?php
if (!defined('AOWOW_REVISION'))
die('illegal access');
class CharRaceList extends BaseType
{
protected $setupQuery = 'SELECT *, id AS ARRAY_KEY FROM ?_races WHERE [cond] ORDER BY Id ASC';
protected $matchQuery = 'SELECT COUNT(1) FROM ?_races WHERE [cond]';
public function getListviewData()
{
$data = [];
while ($this->iterate())
{
$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(&$refs)
{
if (!isset($refs['gRaces']))
$refs['gRaces'] = [];
while ($this->iterate())
$refs['gRaces'][$this->id] = ['name' => $this->getField('name', true)];
}
public function addRewardsToJScript(&$ref) { }
public function renderTooltip() { }
}
?>