Files
aowow/includes/types/zone.class.php
Sarjuuk 43fe5e4b4d - implemented display of spawns and waypoints for gameobjects and creatures
!IMPORTANT!
  Due to the inability to determine what layer covers what height-level
  in multilayer-zones, spawns and waypoints WILL have duplicates and must
  be removed manually from ?_spawns and ?_waypoints respectively, if
  nessecary. Besides, the other points may also need manual love.
- NPC:
  * removed a redundant cuFlags for Bosses
  * set NPC_CU_INSTANCE_BOSS with data from world.instance_encounters
  * removed misc. factions from tooltip
  * fixed malformed condition for creature-loot
  * location is displayed in Listviews (also for GOs)
  * enabled filters foundIn and relatedEvent (also for GOs)
  * do not display empty quotes
- Zone:
  * initial implementation of detail page
- Misc:
  * fixed notices being displayed without restrictions
  * added RewriteBase hint to .htaccess (lost several hours to this one)
  * removed lost isles from dataset 'zones'
  * updated sql-archives and removed old sql updates, db_setup_2.zip
    will need to be reapplied
2014-10-10 21:12:30 +02:00

80 lines
2.0 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() { }
}
?>