mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
* replaced error-suppressions with proper checks * log php errors to db * use __callStatic() to access localization and thus handle erronous keys - Setup: * fixed some erronous filenames when generating icons * increased alpha threshold for spawn maps (should improve spawn points) - disentangled DB::Aowow and DB::World. Aowow should now be able to run with DB::World being on a different server - added missing faction transfer pendants (title/quest/faction/..) - fixed extended costs for specific vendors
72 lines
1.9 KiB
PHP
72 lines
1.9 KiB
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
|
|
class ZoneList extends BaseType
|
|
{
|
|
public static $type = TYPE_ZONE;
|
|
public static $brickFile = 'zone';
|
|
|
|
protected $queryBase = 'SELECT *, id AS ARRAY_KEY FROM ?_zones z';
|
|
|
|
// use if you JUST need the name
|
|
public static function getName($id)
|
|
{
|
|
$n = DB::Aowow()->selectRow('SELECT name_loc0, name_loc2, name_loc3, name_loc6, name_loc8 FROM ?_zones WHERE id = ?d', $id );
|
|
return Util::localizedString($n, 'name');
|
|
}
|
|
|
|
public function getListviewData()
|
|
{
|
|
$data = [];
|
|
|
|
foreach ($this->iterate() as $__)
|
|
{
|
|
$data[$this->id] = array(
|
|
'id' => $this->id,
|
|
'category' => $this->curTpl['category'],
|
|
'territory' => $this->curTpl['faction'],
|
|
'minlevel' => $this->curTpl['levelMin'],
|
|
'maxlevel' => $this->curTpl['levelMax'],
|
|
'name' => $this->getField('name', true)
|
|
);
|
|
|
|
if ($_ = $this->curTpl['expansion'])
|
|
$data[$this->id]['expansion'] = $_;
|
|
|
|
if ($_ = $this->curTpl['type'])
|
|
$data[$this->id]['instance'] = $_;
|
|
|
|
if ($_ = $this->curTpl['maxPlayer'])
|
|
$data[$this->id]['nplayers'] = $_;
|
|
|
|
if ($_ = $this->curTpl['levelReq'])
|
|
$data[$this->id]['reqlevel'] = $_;
|
|
|
|
if ($_ = $this->curTpl['levelReqLFG'])
|
|
$data[$this->id]['lfgReqLevel'] = $_;
|
|
|
|
if ($_ = $this->curTpl['levelHeroic'])
|
|
$data[$this->id]['heroicLevel'] = $_;
|
|
}
|
|
|
|
return $data;
|
|
}
|
|
|
|
public function getJSGlobals($addMask = 0)
|
|
{
|
|
$data = [];
|
|
|
|
foreach ($this->iterate() as $__)
|
|
$data[TYPE_ZONE][$this->id] = ['name' => $this->getField('name', true)];
|
|
|
|
return $data;
|
|
}
|
|
|
|
public function renderTooltip() { }
|
|
}
|
|
|
|
?>
|