- moved search to /pages - moved g_dataKey to header.tpl and apply it on nessecary pages (restores TalentCalc) - Events: fixed relTabs with arbitrary data, when holidayId was 0 - CharClass: get heroClass-status through flags; dropped related DB-field - Achievements: fixed some criteria not being displayed in tooltips - Community: applied long forgotten changes to tplVars and use of uppercase ids - Titles: * exclude unused titles from listview * restored 'links'-button on detail-page - Quests: * added 'slain' fro proxy-npcs * use more wflags (&1 needs more research) - Factions: * fixed order of categories * fixed params to QuestList for relTabs - Profiler: * enabled 'profiles that have this char as source' in Profiler * removed the exampelChar from project * further documented more expected variables; includes/excludes-handling still not entirely clear * created datasets for reference data (create with ?build=profiler) - Localzation: * localized profiler for loc3 * corrected some single words * localized custom reward rate - table in factions - AjaxHandler: * new handler for ajax-requests *duh* * dropped data.php (index.php now calls to AjaxHandler for these cases) - moved reading of static files to own function Util::loadStaticFile()
65 lines
2 KiB
PHP
65 lines
2 KiB
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
|
|
class PetList extends BaseType
|
|
{
|
|
use ListviewHelper;
|
|
|
|
public static $type = TYPE_PET;
|
|
public static $brickFile = 'pet';
|
|
|
|
protected $queryBase = 'SELECT *, id AS ARRAY_KEY FROM ?_pet p';
|
|
|
|
public function getListviewData()
|
|
{
|
|
$data = [];
|
|
|
|
foreach ($this->iterate() as $__)
|
|
{
|
|
$data[$this->id] = array(
|
|
'armor' => $this->curTpl['armor'],
|
|
'damage' => $this->curTpl['damage'],
|
|
'health' => $this->curTpl['health'],
|
|
'diet' => $this->curTpl['foodMask'],
|
|
'icon' => $this->curTpl['iconString'],
|
|
'id' => $this->id,
|
|
'maxlevel' => $this->curTpl['maxLevel'],
|
|
'minlevel' => $this->curTpl['minLevel'],
|
|
'name' => $this->getField('name', true),
|
|
'type' => $this->curTpl['type'],
|
|
'exotic' => $this->curTpl['exotic'],
|
|
'spells' => []
|
|
);
|
|
|
|
if ($this->curTpl['expansion'] > 0)
|
|
$data[$this->id]['expansion'] = $this->curTpl['expansion'];
|
|
|
|
for ($i = 1; $i <= 4; $i++)
|
|
if ($this->curTpl['spellId'.$i] > 0)
|
|
$data[$this->id]['spells'][] = $this->curTpl['spellId'.$i];
|
|
}
|
|
|
|
return $data;
|
|
}
|
|
|
|
public function addGlobalsToJScript($addMask = GLOBALINFO_ANY)
|
|
{
|
|
foreach ($this->iterate() as $__)
|
|
{
|
|
if ($addMask & GLOBALINFO_RELATED)
|
|
for ($i = 1; $i <= 4; $i++)
|
|
if ($this->curTpl['spellId'.$i] > 0)
|
|
Util::$pageTemplate->extendGlobalIds(TYPE_SPELL, $this->curTpl['spellId'.$i]);
|
|
|
|
if ($addMask & GLOBALINFO_SELF)
|
|
Util::$pageTemplate->extendGlobalData(self::$type, [$this->id => ['icon' => $this->curTpl['iconString']]]);
|
|
}
|
|
}
|
|
|
|
public function renderTooltip() { }
|
|
}
|
|
|
|
?>
|