mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
- make offset optional, when converting list to mask Items: - fixed display of inventory type for robes and ranged weapons Spells: - parsing: $charLevel and $interactive are now properties of spell. - parsing: fixed durations, passing the time-unit seperately to allow for evaluation of the actual value - parsing: fixed gender-specific formating [ >male/female< to <male/female>] - parsing: usage of is_numeric() instead of (float) as 0 is a fucking valid numeric (caused some formulas to not be evaluated *grrr*) - parsing: lastValue-references now skip to the next previous \d instead of being stopped by random \w (like time units) - implemented forgotten display of runes for spellCost - fixed castTimes for most hunter shots (they are -1000 for some reason) - fixed display of required stances (sometimes they are not actually required but show, when you are _allowed_ to use a spell in certain forms) - improved formating of tooltips-js (no visual change) ListViews: - pass '_truncated' separately. there are nough cases in which 'note' gets send without truncated results misc changes here and there
64 lines
2.0 KiB
PHP
64 lines
2.0 KiB
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
class PetList extends BaseType
|
|
{
|
|
use ListviewHelper;
|
|
|
|
protected $setupQuery = 'SELECT *, id AS ARRAY_KEY FROM ?_pet WHERE [cond] ORDER BY Id ASC';
|
|
protected $matchQuery = 'SELECT COUNT(1) FROM ?_pet WHERE [cond]';
|
|
|
|
public function getListviewData()
|
|
{
|
|
$data = [];
|
|
|
|
while ($this->iterate())
|
|
{
|
|
$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->names[$this->id],
|
|
'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];
|
|
|
|
$data[$this->id]['spells'] = json_encode($data[$this->id]['spells'], JSON_NUMERIC_CHECK);
|
|
}
|
|
|
|
return $data;
|
|
}
|
|
|
|
public function addGlobalsToJscript(&$refs)
|
|
{
|
|
$gathered = [];
|
|
while ($this->iterate())
|
|
for ($i = 1; $i <= 4; $i++)
|
|
if ($this->curTpl['spellId'.$i] > 0)
|
|
$gathered[] = (int)$this->curTpl['spellId'.$i];
|
|
|
|
if ($gathered)
|
|
(new SpellList(array(['s.id', $gathered])))->addGlobalsToJscript($refs);
|
|
}
|
|
|
|
public function addRewardsToJScript(&$ref) { }
|
|
public function renderTooltip() { }
|
|
}
|
|
|
|
?>
|