mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
I'm not overly happy with passing the templateObject to each typeObject, but it works .. for now. Effectively this should reduce db-lookups as each type should be looked up only twice at max (once for relevant data on the page and maybe again to get related jsGlobals for the template) also removed BaseType::addRewardsToJscript() get it with BaseType::addGlobalsToJscript() and the appropriate addMask * added ListviewHelper::getSetFields() wich is more appropriate in some cases (like reagents for spells should be shown even if they are all the same) * load bricks as needed, removed the if-blocks (maybe add the filename to every TypeClass..?)
46 lines
902 B
PHP
46 lines
902 B
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
|
|
class FactionList extends BaseType
|
|
{
|
|
public static $type = TYPE_FACTION;
|
|
|
|
public static function getName($id)
|
|
{
|
|
$n = DB::Aowow()->SelectRow('
|
|
SELECT
|
|
name_loc0,
|
|
name_loc2,
|
|
name_loc3,
|
|
name_loc6,
|
|
name_loc8
|
|
FROM
|
|
?_factions
|
|
WHERE
|
|
factionID = ?d',
|
|
$id
|
|
);
|
|
return Util::localizedString($n, 'name');
|
|
}
|
|
|
|
public function reactsAgainst($faction)
|
|
{
|
|
// see factionTemplate
|
|
/*
|
|
1: friendly
|
|
0: neutral
|
|
-1: hostile
|
|
*/
|
|
}
|
|
|
|
public function getListviewData() { }
|
|
public function addGlobalsToJScript(&$template, $addMask = 0) { }
|
|
public function renderTooltip() { }
|
|
|
|
}
|
|
|
|
?>
|