mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
* Factions: set titles for ListPage
* GameObjects: initial implementation (some filter missing; positions not yet availabe; some custom data to be set; required table will be added later) * MiscTools: fixed random page; 'implemented' missing Screenshots; fixed access to template file * Search: implemented check for CUSTOM_EXCLUDE_FOR_LISTVIEW if user is not in U_GROUP_STAFF; searches should now be cachable * NPCs: three more tabs on detailPage * some work against Quests * fighting the template-system :<
This commit is contained in:
2
data.php
2
data.php
@@ -47,7 +47,7 @@ foreach ($datasets as $data)
|
||||
else if (file_exists('datasets/'.$data.$params))
|
||||
echo file_get_contents('datasets/'.$data.$params);
|
||||
else if ($AoWoWconf['debug'])
|
||||
echo "/* could not fetch static data: ".$data.$params." for locale: ".User::$localeString." */";
|
||||
echo "alert('could not fetch static data: ".$data.$params." for locale: ".User::$localeString."');";
|
||||
echo "\n\n";
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -176,7 +176,7 @@ define('LOOT_PROSPECTING', 'prospecting_loot_template');
|
||||
define('LOOT_MILLING', 'milling_loot_template');
|
||||
define('LOOT_PICKPOCKET', 'pickpocketing_loot_template');
|
||||
define('LOOT_SKINNING', 'skinning_loot_template');
|
||||
define('LOOT_QUEST', 'mail_loot_template'); // changed to quest_mail_loot_template..?
|
||||
define('LOOT_MAIL', 'mail_loot_template'); // used by achievements and quests
|
||||
define('LOOT_SPELL', 'spell_loot_template');
|
||||
define('LOOT_REFERENCE', 'reference_loot_template');
|
||||
|
||||
|
||||
@@ -14,9 +14,10 @@ error_reporting($e);
|
||||
|
||||
define('STATIC_URL', substr('http://'.$_SERVER['SERVER_NAME'].strtr($_SERVER['SCRIPT_NAME'], ['index.php' => '']), 0, -1));
|
||||
|
||||
define('SQL_LIMIT_NONE', 0);
|
||||
define('SQL_LIMIT_SEARCH', $AoWoWconf['searchLimit']);
|
||||
define('SQL_LIMIT_DEFAULT', $AoWoWconf['defaultLimit']);
|
||||
define('SQL_LIMIT_NONE', 0);
|
||||
define('SQL_LIMIT_SEARCH', $AoWoWconf['searchLimit']);
|
||||
define('SQL_LIMIT_QUCKSEARCH', $AoWoWconf['quickSearchLimit']);
|
||||
define('SQL_LIMIT_DEFAULT', $AoWoWconf['defaultLimit']);
|
||||
|
||||
require 'includes/libs/Smarty-2.6.26/libs/Smarty.class.php';// Libraray: http://www.smarty.net/
|
||||
// require 'includes/libs/Smarty-3.1.14/libs/Smarty.class.php'; // Libraray: http://www.smarty.net/
|
||||
|
||||
@@ -9,6 +9,7 @@ class AchievementList extends BaseType
|
||||
use listviewHelper;
|
||||
|
||||
public static $type = TYPE_ACHIEVEMENT;
|
||||
public static $brickFile = 'achievement';
|
||||
|
||||
public $criteria = [];
|
||||
public $tooltip = [];
|
||||
@@ -19,6 +20,10 @@ class AchievementList extends BaseType
|
||||
'ac' => ['j' => ['?_achievementcriteria AS `ac` ON `ac`.`refAchievementId` = `a`.`id`', true], 'g' => '`a`.`id`']
|
||||
);
|
||||
|
||||
/*
|
||||
todo: evaluate TC custom-data-tables: a*_criteria_data should be merged on installation, a*_reward linked with mail_loot_template and achievement
|
||||
*/
|
||||
|
||||
public function __construct($conditions = [], $applyFilter = false)
|
||||
{
|
||||
parent::__construct($conditions, $applyFilter);
|
||||
|
||||
@@ -311,8 +311,9 @@ abstract class BaseType
|
||||
|
||||
public function getRandomId()
|
||||
{
|
||||
$pattern = '/SELECT .* (-?[\w_]*\.?(id|entry)) AS ARRAY_KEY,?.* FROM (.*) WHERE .*/i';
|
||||
$replace = 'SELECT $1 FROM $3 ORDER BY RAND() ASC LIMIT 1';
|
||||
// its not optimal, so if anyone has an alternative idea..
|
||||
$pattern = '/SELECT .* (-?`?[\w_]*\`?.?`?(id|entry)`?) AS ARRAY_KEY,?.* FROM (\?[\w_-]+) (`?\w*`?)/i';
|
||||
$replace = 'SELECT $1 FROM $3 $4 WHERE (cuFlags & '.CUSTOM_EXCLUDE_FOR_LISTVIEW.') = 0 ORDER BY RAND() ASC LIMIT 1';
|
||||
$query = preg_replace($pattern, $replace, $this->queryBase);
|
||||
|
||||
return DB::Aowow()->selectCell($query);
|
||||
|
||||
@@ -7,6 +7,7 @@ if (!defined('AOWOW_REVISION'))
|
||||
class CharClassList extends BaseType
|
||||
{
|
||||
public static $type = TYPE_CLASS;
|
||||
public static $brickFile = 'class';
|
||||
|
||||
protected $queryBase = 'SELECT *, id AS ARRAY_KEY FROM ?_classes c';
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ if (!defined('AOWOW_REVISION'))
|
||||
class CharRaceList extends BaseType
|
||||
{
|
||||
public static $type = TYPE_RACE;
|
||||
public static $brickFile = 'race';
|
||||
|
||||
protected $queryBase = 'SELECT *, id AS ARRAY_KEY FROM ?_races r';
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ class CreatureList extends BaseType
|
||||
use spawnHelper;
|
||||
|
||||
public static $type = TYPE_NPC;
|
||||
public static $brickFile = 'creature';
|
||||
|
||||
public $tooltips = [];
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ if (!defined('AOWOW_REVISION'))
|
||||
class CurrencyList extends BaseType
|
||||
{
|
||||
public static $type = TYPE_CURRENCY;
|
||||
public static $brickFile = 'currency';
|
||||
|
||||
protected $queryBase = 'SELECT *, id AS ARRAY_KEY FROM ?_currencies c';
|
||||
|
||||
|
||||
@@ -7,11 +7,12 @@ if (!defined('AOWOW_REVISION'))
|
||||
class FactionList extends BaseType
|
||||
{
|
||||
public static $type = TYPE_FACTION;
|
||||
public static $brickFile = 'faction';
|
||||
|
||||
protected $queryBase = 'SELECT f1.*, f1.id AS ARRAY_KEY, f1.parentFactionId AS cat FROM ?_factions f1';
|
||||
protected $queryBase = 'SELECT f.*, f.parentFactionId AS cat, f.id AS ARRAY_KEY FROM ?_factions f';
|
||||
protected $queryOpts = array(
|
||||
'f1' => [['f2']],
|
||||
'f2' => ['j' => ['?_factions f2 ON f1.parentFactionId = f2.id', true], 's' => ', IFNULL(f2.parentFactionId, 0) AS cat2']
|
||||
'f' => [['f2']],
|
||||
'f2' => ['j' => ['?_factions f2 ON f.parentFactionId = f2.id', true], 's' => ', IFNULL(f2.parentFactionId, 0) AS cat2']
|
||||
);
|
||||
|
||||
public function __construct($conditions = [])
|
||||
|
||||
@@ -9,12 +9,14 @@ class GameObjectList extends BaseType
|
||||
use listviewHelper, spawnHelper;
|
||||
|
||||
public static $type = TYPE_OBJECT;
|
||||
public static $brickFile = 'object';
|
||||
|
||||
protected $queryBase = 'SELECT *, go.entry AS ARRAY_KEY FROM gameobject_template go';
|
||||
protected $queryBase = 'SELECT *, o.id AS ARRAY_KEY FROM ?_objects o';
|
||||
protected $queryOpts = array(
|
||||
'go' => [['lg', 'l']],
|
||||
'lg' => ['j' => ['locales_gameobject lg ON go.entry = lg.entry', true]],
|
||||
'l' => ['j' => ['?_lock l ON l.id = IF(go.type = 3, data0, null)', true], 's' => ', l.type1, l.properties1, l.reqSkill1, l.type2, l.properties2, l.reqSkill2']
|
||||
'o' => [['ft']],
|
||||
'ft' => ['j' => ['?_factiontemplate ft ON ft.id = o.faction', true], 's' => ', ft.*'],
|
||||
'qr' => ['j' => ['gameobject_questrelation qr ON qr.id = o.id', true]], // started by GO
|
||||
'ir' => ['j' => ['gameobject_involvedrelation ir ON ir.id = o.id', true]], // ends at GO
|
||||
);
|
||||
|
||||
public function __construct($conditions = [], $applyFilter = false)
|
||||
@@ -25,52 +27,32 @@ class GameObjectList extends BaseType
|
||||
return;
|
||||
|
||||
// post processing
|
||||
// most of this will be obsolete, when gameobjects get their own table
|
||||
foreach ($this->iterate() as $_id => &$curTpl)
|
||||
{
|
||||
// unpack miscInfo:
|
||||
$curTpl['lootStack'] = [];
|
||||
$curTpl['spells'] = [];
|
||||
$curTpl['spellFocusId'] = 0;
|
||||
|
||||
if (in_array($curTpl['type'], [OBJECT_GOOBER, OBJECT_RITUAL, OBJECT_SPELLCASTER, OBJECT_FLAGSTAND, OBJECT_FLAGDROP, OBJECT_AURA_GENERATOR, OBJECT_TRAP]))
|
||||
$curTpl['spells'] = array_combine(['onUse', 'onSuccess', 'aura', 'triggered'], [$curTpl['onUseSpell'], $curTpl['onSuccessSpell'], $curTpl['auraSpell'], $curTpl['triggeredSpell']]);
|
||||
|
||||
if (!$curTpl['miscInfo'])
|
||||
continue;
|
||||
|
||||
switch ($curTpl['type'])
|
||||
{
|
||||
case OBJECT_CHEST:
|
||||
$curTpl['lootId'] = $curTpl['data1'];
|
||||
$curTpl['lootStack'] = [$curTpl['data4'], $curTpl['data5']];
|
||||
$curTpl['lockId'] = $curTpl['data0'];
|
||||
|
||||
if (!isset($curTpl['properties1']))
|
||||
break;
|
||||
|
||||
if ($curTpl['properties1'] == LOCK_PROPERTY_HERBALISM)
|
||||
{
|
||||
$curTpl['reqSkill'] = $curTpl['reqSkill1'];
|
||||
$curTpl['type'] = -3;
|
||||
}
|
||||
else if ($curTpl['properties1'] == LOCK_PROPERTY_MINING)
|
||||
{
|
||||
$curTpl['reqSkill'] = $curTpl['reqSkill1'];
|
||||
$curTpl['type'] = -4;
|
||||
}
|
||||
else if ($curTpl['properties1'] == LOCK_PROPERTY_FOOTLOCKER)
|
||||
{
|
||||
$curTpl['reqSkill'] = $curTpl['reqSkill1'];
|
||||
$curTpl['type'] = -5;
|
||||
}
|
||||
else if( $curTpl['properties2'] == LOCK_PROPERTY_FOOTLOCKER)
|
||||
{
|
||||
$curTpl['reqSkill'] = $curTpl['reqSkill2'];
|
||||
$curTpl['type'] = -5;
|
||||
}
|
||||
|
||||
break;
|
||||
case OBJECT_FISHINGHOLE:
|
||||
$curTpl['lootId'] = $curTpl['data1'];
|
||||
$curTpl['lootStack'] = [$curTpl['data2'], $curTpl['data3']];
|
||||
$curTpl['lootStack'] = explode(' ', $curTpl['miscInfo']);
|
||||
break;
|
||||
default: // adding more, when i need them
|
||||
$curTpl['lockId'] = 0;
|
||||
case OBJECT_CAPTURE_POINT:
|
||||
$curTpl['capture'] = explode(' ', $curTpl['miscInfo']);
|
||||
break;
|
||||
case OBJECT_MEETINGSTONE:
|
||||
$curTpl['mStone'] = explode(' ', $curTpl['miscInfo']);
|
||||
break;
|
||||
}
|
||||
|
||||
for ($i = 0; $i < 24; $i++) // kill indescriptive/unused fields
|
||||
unset($curTpl['data'.$i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,13 +66,9 @@ class GameObjectList extends BaseType
|
||||
name_loc6,
|
||||
name_loc8
|
||||
FROM
|
||||
gameobject_template gt
|
||||
LEFT JOIN
|
||||
locales_gameobject lg
|
||||
ON
|
||||
lg.entry = gt.entry
|
||||
?_objects
|
||||
WHERE
|
||||
gt.entry = ?d',
|
||||
id = ?d',
|
||||
$id
|
||||
);
|
||||
return Util::localizedString($n, 'name');
|
||||
@@ -104,7 +82,7 @@ class GameObjectList extends BaseType
|
||||
$data[$this->id] = array(
|
||||
'id' => $this->id,
|
||||
'name' => $this->getField('name', true),
|
||||
'type' => $this->curTpl['type']
|
||||
'type' => $this->curTpl['typeCat']
|
||||
);
|
||||
|
||||
if (!empty($this->curTpl['reqSkill']))
|
||||
@@ -124,10 +102,13 @@ class GameObjectList extends BaseType
|
||||
|
||||
$x = '<table>';
|
||||
$x .= '<tr><td><b class="q">'.$this->getField('name', true).'</b></td></tr>';
|
||||
$x .= '<tr><td>[TYPE '.$this->curTpl['type'].']</td></tr>';
|
||||
if ($locks = Lang::getLocks($this->curTpl['lockId']))
|
||||
foreach ($locks as $l)
|
||||
$x .= '<tr><td>'.$l.'</td></tr>';
|
||||
if ($_ = @Lang::$gameObject['type'][$this->curTpl['typeCat']])
|
||||
$x .= '<tr><td>'.$_.'</td></tr>';
|
||||
|
||||
if (isset($this->curTpl['lockId']))
|
||||
if ($locks = Lang::getLocks($this->curTpl['lockId']))
|
||||
foreach ($locks as $l)
|
||||
$x .= '<tr><td>'.$l.'</td></tr>';
|
||||
|
||||
$x .= '</table>';
|
||||
|
||||
@@ -136,7 +117,104 @@ class GameObjectList extends BaseType
|
||||
return $this->tooltips[$this->id];
|
||||
}
|
||||
|
||||
public function addGlobalsToJScript(&$template, $addMask = 0) { }
|
||||
public function addGlobalsToJScript(&$template, $addMask = 0)
|
||||
{
|
||||
foreach ($this->iterate() as $id => $__)
|
||||
$template->extendGlobalData(self::$type, [$id => ['name' => $this->getField('name', true)]]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class GameObjectListFilter extends Filter
|
||||
{
|
||||
protected $genericFilter = array(
|
||||
15 => [FILTER_CR_NUMERIC, 'entry', null], // id
|
||||
7 => [FILTER_CR_NUMERIC, 'reqSkill', null], // requiredskilllevel
|
||||
);
|
||||
|
||||
/*
|
||||
{ id: 1, name: 'foundin', type: 'zone' },
|
||||
{ id: 16, name: 'relatedevent', type: 'event-any+none' },
|
||||
*/
|
||||
|
||||
protected function createSQLForCriterium(&$cr)
|
||||
{
|
||||
if (in_array($cr[0], array_keys($this->genericFilter)))
|
||||
{
|
||||
if ($genCR = $this->genericCriterion($cr))
|
||||
return $genCR;
|
||||
|
||||
unset($cr);
|
||||
$this->error = true;
|
||||
return [1];
|
||||
}
|
||||
|
||||
switch ($cr[0])
|
||||
{
|
||||
case 4:
|
||||
if (!$this->int2Bool($cr[1]))
|
||||
break;
|
||||
|
||||
return $cr[1] ? ['OR', ['flags', 0x2, '&'], ['type', 3]] : ['AND', [['flags', 0x2, '&'], 0], ['type', 3, '!']];
|
||||
case 5: // averagemoneycontained [op] [int] GOs don't contain money .. eval to 0 == true
|
||||
if (!$this->isSaneNumeric($cr[2], false) || !$this->int2Op($cr[1]))
|
||||
break;
|
||||
|
||||
return eval('return ('.$cr[2].' '.$cr[1].' 0)') ? [1] : [0];
|
||||
case 2: // startsquest [side]
|
||||
switch ($cr[1])
|
||||
{
|
||||
case 1: // any
|
||||
return ['qr.id', null, '!'];
|
||||
case 2: // alliance only
|
||||
return ['AND', ['qr.id', null, '!'], ['ft.A', -1, '!'], ['ft.H', -1]];
|
||||
case 3: // horde only
|
||||
return ['AND', ['qr.id', null, '!'], ['ft.A', -1], ['ft.H', -1, '!']];
|
||||
case 4: // both
|
||||
return ['AND', ['qr.id', null, '!'], ['OR', ['faction', 0], ['AND', ['ft.A', -1, '!'], ['ft.H', -1, '!']]]];
|
||||
case 5: // none
|
||||
return ['qr.id', null];
|
||||
}
|
||||
break;
|
||||
case 3: // endsquest [side]
|
||||
switch ($cr[1])
|
||||
{
|
||||
case 1: // any
|
||||
return ['qi.id', null, '!'];
|
||||
case 2: // alliance only
|
||||
return ['AND', ['qi.id', null, '!'], ['ft.A', -1, '!'], ['ft.H', -1]];
|
||||
case 3: // horde only
|
||||
return ['AND', ['qi.id', null, '!'], ['ft.A', -1], ['ft.H', -1, '!']];
|
||||
case 4: // both
|
||||
return ['AND', ['qi.id', null, '!'], ['OR', ['faction', 0], ['AND', ['ft.A', -1, '!'], ['ft.H', -1, '!']]]];
|
||||
case 5: // none
|
||||
return ['qi.id', null];
|
||||
}
|
||||
break;
|
||||
case 13: // hascomments [yn]
|
||||
break;
|
||||
case 11: // hasscreenshots [yn]
|
||||
break;
|
||||
case 18: // hasvideos [yn]
|
||||
break;
|
||||
}
|
||||
|
||||
unset($cr);
|
||||
$this->error = 1;
|
||||
return [1];
|
||||
}
|
||||
|
||||
protected function createSQLForValues()
|
||||
{
|
||||
$parts = [];
|
||||
$_v = $this->fiData['v'];
|
||||
|
||||
// name
|
||||
if (isset($_v['na']))
|
||||
$parts[] = ['name_loc'.User::$localeId, $_v['na']];
|
||||
|
||||
return $parts;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -9,6 +9,7 @@ class ItemList extends BaseType
|
||||
use ListviewHelper;
|
||||
|
||||
public static $type = TYPE_ITEM;
|
||||
public static $brickFile = 'item';
|
||||
|
||||
public $tooltip = [];
|
||||
public $json = [];
|
||||
@@ -1435,7 +1436,6 @@ class ItemList extends BaseType
|
||||
}
|
||||
|
||||
|
||||
// missing each and everything
|
||||
class ItemListFilter extends Filter
|
||||
{
|
||||
// usable-by - limit weapon/armor selection per CharClass - itemClass => available itemsubclasses
|
||||
|
||||
@@ -9,6 +9,7 @@ class ItemsetList extends BaseType
|
||||
use ListviewHelper;
|
||||
|
||||
public static $type = TYPE_ITEMSET;
|
||||
public static $brickFile = 'itemset';
|
||||
|
||||
public $pieceToSet = []; // used to build g_items and search
|
||||
private $classes = []; // used to build g_classes
|
||||
|
||||
@@ -9,6 +9,7 @@ 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';
|
||||
|
||||
|
||||
@@ -7,24 +7,30 @@ if (!defined('AOWOW_REVISION'))
|
||||
class QuestList extends BaseType
|
||||
{
|
||||
public static $type = TYPE_QUEST;
|
||||
public static $brickFile = 'quest';
|
||||
|
||||
public $requires = [];
|
||||
public $rewards = [];
|
||||
|
||||
protected $queryBase = 'SELECT *, qt.id AS ARRAY_KEY FROM quest_template qt';
|
||||
protected $queryOpts = array(
|
||||
'qt' => [['lq']],
|
||||
'lq' => ['j' => ['locales_quest lq ON qt.id = lq.id', true]]
|
||||
'qt' => [['lq', 'xp']],
|
||||
'lq' => ['j' => ['locales_quest lq ON qt.id = lq.id', true]],
|
||||
'xp' => ['j' => ['?_questxp xp ON qt.level = xp.id', true], 's' => ', xp.*'],
|
||||
'goStart' => ['j' => 'gameobject_questrelation goStart ON goStart.quest = qt.id'], // started by GO
|
||||
'goEnd' => ['j' => 'gameobject_involvedrelation goEnd ON goEnd.quest = qt.id'], // ends at GO
|
||||
'npcStart' => ['j' => 'creature_questrelation npcStart ON npcStart.quest = qt.id'], // started by NPC
|
||||
'npcEnd' => ['j' => 'creature_involvedrelation npcEnd ON npcEnd.quest = qt.id'], // ends at NPC
|
||||
'itemStart' => ['j' => ['?_items itemStart ON itemStart.startQuest = qt.id', true], 'g' => 'qt.id'] // started by item .. grouping required, as the same quest may have multiple starter
|
||||
);
|
||||
|
||||
public function __construct($conditions = [])
|
||||
public function __construct($conditions = [], $applyFilter = false)
|
||||
{
|
||||
parent::__construct($conditions);
|
||||
parent::__construct($conditions, $applyFilter);
|
||||
|
||||
// post processing
|
||||
foreach ($this->iterate() as $id => &$_curTpl)
|
||||
{
|
||||
|
||||
$_curTpl['cat1'] = $_curTpl['ZoneOrSort']; // should probably be in a method...
|
||||
$_curTpl['cat2'] = 0;
|
||||
|
||||
@@ -37,6 +43,11 @@ class QuestList extends BaseType
|
||||
}
|
||||
}
|
||||
|
||||
// set xp
|
||||
$_curTpl['xp'] = $_curTpl['Field'.$_curTpl['RewardXPId']];
|
||||
for ($i = 0; $i < 9; $i++)
|
||||
unset($_curTpl['Field'.$i]);
|
||||
|
||||
// todo (med): extend for reward case
|
||||
$data = [];
|
||||
for ($i = 1; $i < 7; $i++)
|
||||
@@ -81,17 +92,6 @@ class QuestList extends BaseType
|
||||
);
|
||||
return Util::localizedString($n, 'title');
|
||||
}
|
||||
|
||||
public static function getXPReward($questLevel, $xpId)
|
||||
{
|
||||
if (!is_numeric($xpId) || $xpId < 0 || $xpId > 8)
|
||||
return 0;
|
||||
|
||||
if ($xp = DB::Aowow()->selectCell('SELECT Field?d FROM ?_questxp WHERE Id = ?d', $xpId, $questLevel))
|
||||
return $xp;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
// static use END
|
||||
|
||||
public function getSourceData()
|
||||
@@ -127,7 +127,7 @@ class QuestList extends BaseType
|
||||
'name' => $this->getField('Title', true),
|
||||
'side' => Util::sideByRaceMask($this->curTpl['RequiredRaces']),
|
||||
'wflags' => 0x0,
|
||||
'xp' => self::getXPReward($this->curTpl['Level'], $this->curTpl['RewardXPId'])
|
||||
'xp' => $this->curTpl['xp']
|
||||
);
|
||||
|
||||
$rewards = [];
|
||||
@@ -229,7 +229,7 @@ class QuestList extends BaseType
|
||||
$x = '';
|
||||
if ($level)
|
||||
{
|
||||
$level = sprintf(Lang::$quest['level'], $level);
|
||||
$level = sprintf(Lang::$quest['questLevel'], $level);
|
||||
|
||||
if ($this->curTpl['Flags'] & 0x1000) // daily
|
||||
$level .= ' '.Lang::$quest['daily'];
|
||||
@@ -314,4 +314,186 @@ class QuestList extends BaseType
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class QuestListFilter extends Filter
|
||||
{
|
||||
protected $enums = array();
|
||||
protected $genericFilter = array();
|
||||
|
||||
/*
|
||||
{ id: 34, name: 'availabletoplayers', type: 'yn' },
|
||||
{ id: 37, name: 'classspecific', type: 'classs' },
|
||||
{ id: 38, name: 'racespecific', type: 'race' },
|
||||
{ id: 27, name: 'daily', type: 'yn' },
|
||||
{ id: 28, name: 'weekly', type: 'yn' },
|
||||
{ id: 29, name: 'repeatable', type: 'yn' },
|
||||
{ id: 30, name: 'id', type: 'num', before: 'name' },
|
||||
{ id: 44, name: 'countsforloremaster_stc', type: 'yn' },
|
||||
{ id: 9, name: 'objectiveearnrepwith', type: 'faction-any+none' },
|
||||
{ id: 33, name: 'relatedevent', type: 'event-any+none' },
|
||||
{ id: 5, name: 'sharable', type: 'yn' },
|
||||
{ id: 11, name: 'suggestedplayers', type: 'num' },
|
||||
{ id: 6, name: 'timer', type: 'num' },
|
||||
{ id: 42, name: 'flags', type: 'flags', staffonly: true },
|
||||
{ id: 2, name: 'experiencegained', type: 'num' },
|
||||
{ id: 43, name: 'currencyrewarded', type: 'currency' },
|
||||
{ id: 45, name: 'titlerewarded', type: 'yn' },
|
||||
{ id: 23, name: 'itemchoices', type: 'num' },
|
||||
{ id: 22, name: 'itemrewards', type: 'num' },
|
||||
{ id: 3, name: 'moneyrewarded', type: 'num' },
|
||||
{ id: 4, name: 'spellrewarded', type: 'yn' },
|
||||
{ id: 1, name: 'increasesrepwith', type: 'faction' },
|
||||
{ id: 10, name: 'decreasesrepwith', type: 'faction' },
|
||||
{ id: 7, name: 'firstquestseries', type: 'yn' },
|
||||
{ id: 15, name: 'lastquestseries', type: 'yn' },
|
||||
{ id: 16, name: 'partseries', type: 'yn' },
|
||||
{ id: 25, name: 'hascomments', type: 'yn' },
|
||||
{ id: 18, name: 'hasscreenshots', type: 'yn' },
|
||||
{ id: 36, name: 'hasvideos', type: 'yn' },
|
||||
|
||||
*/
|
||||
|
||||
protected function createSQLForCriterium(&$cr)
|
||||
{
|
||||
if (in_array($cr[0], array_keys($this->genericFilter)))
|
||||
{
|
||||
if ($genCR = $this->genericCriterion($cr))
|
||||
return $genCR;
|
||||
|
||||
unset($cr);
|
||||
$this->error = true;
|
||||
return [1];
|
||||
}
|
||||
|
||||
switch ($cr[0])
|
||||
{
|
||||
case 19: // startsfrom [enum]
|
||||
switch ($cr[1])
|
||||
{
|
||||
case 1: // npc
|
||||
return ['npcStart.id', null, '!'];
|
||||
break;
|
||||
case 2: // object
|
||||
return ['goStart.id', null, '!'];
|
||||
break;
|
||||
case 3: // item
|
||||
return ['itemStart.id', null, '!'];
|
||||
}
|
||||
break;
|
||||
case 21: // endsat [enum]
|
||||
switch ($cr[1])
|
||||
{
|
||||
case 1: // npc
|
||||
return ['npcEnd.id', null, '!'];
|
||||
break;
|
||||
case 2: // object
|
||||
return ['goEnd.id', null, '!'];
|
||||
break;
|
||||
}
|
||||
break;
|
||||
// case 24: // lacksstartend [bool] cost an impossible amount of resources
|
||||
// if ($this->int2Bool($cr[1]))
|
||||
// {
|
||||
// if ($cr[1])
|
||||
// return ['OR', ['AND', ['npcStart.id', null], ['goStart.id', null], ['itemStart.id', null]], ['AND', ['npcEnd.id', null], ['goEnd.id', null]]];
|
||||
// else
|
||||
// return ['AND', ['OR', ['npcStart.id', null, '!'], ['goStart.id', null, '!'], ['itemStart.id', null, '!']], ['OR', ['npcEnd.id', null, '!'], ['goEnd.id', null, '!']]];
|
||||
// }
|
||||
// break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
unset($cr);
|
||||
$this->error = 1;
|
||||
return [1];
|
||||
}
|
||||
|
||||
protected function createSQLForValues()
|
||||
{
|
||||
$parts = [];
|
||||
$_v = $this->fiData['v'];
|
||||
|
||||
// name
|
||||
if (isset($_v['na']))
|
||||
{
|
||||
$name = User::$localeId ? 'title_loc'.User::$localeId : 'title';
|
||||
$objectives = User::$localeId ? 'objectives_loc'.User::$localeId : 'objectives';
|
||||
$description = User::$localeId ? 'details_loc'.User::$localeId : 'details';
|
||||
|
||||
if (isset($_v['ex']) && $_v['ex'] == 'on')
|
||||
$parts[] = ['OR', [$name, $_v['na']], [$objectives, $_v['na']], [$description, $_v['na']]];
|
||||
else
|
||||
$parts[] = [$name, $_v['na']];
|
||||
}
|
||||
|
||||
// level min
|
||||
if (isset($_v['minle']))
|
||||
{
|
||||
if (is_int($_v['minle']) && $_v['minle'] > 0)
|
||||
$parts[] = ['level', $_v['minle'], '>=']; // not considering quests that are always at player level (-1)
|
||||
else
|
||||
unset($_v['minle']);
|
||||
}
|
||||
|
||||
// level max
|
||||
if (isset($_v['maxle']))
|
||||
{
|
||||
if (is_int($_v['maxle']) && $_v['maxle'] > 0)
|
||||
$parts[] = ['level', $_v['maxle'], '<='];
|
||||
else
|
||||
unset($_v['maxle']);
|
||||
}
|
||||
|
||||
// reqLevel min
|
||||
if (isset($_v['minrl']))
|
||||
{
|
||||
if (is_int($_v['minrl']) && $_v['minrl'] > 0)
|
||||
$parts[] = ['minLevel', $_v['minrl'], '>='];// ignoring maxLevel
|
||||
else
|
||||
unset($_v['minrl']);
|
||||
}
|
||||
|
||||
// reqLevel max
|
||||
if (isset($_v['maxrl']))
|
||||
{
|
||||
if (is_int($_v['maxrl']) && $_v['maxrl'] > 0)
|
||||
$parts[] = ['minLevel', $_v['maxrl'], '<='];// ignoring maxLevel
|
||||
else
|
||||
unset($_v['maxrl']);
|
||||
}
|
||||
|
||||
// side
|
||||
if (isset($_v['si']))
|
||||
{
|
||||
$ex = [['requiredRaces', RACE_MASK_ALL, '&'], RACE_MASK_ALL, '!'];
|
||||
$notEx = ['OR', ['requiredRaces', 0], [['requiredRaces', RACE_MASK_ALL, '&'], RACE_MASK_ALL]];
|
||||
|
||||
switch ($_v['si'])
|
||||
{
|
||||
case 3:
|
||||
$parts[] = $notEx;
|
||||
break;
|
||||
case 2:
|
||||
$parts[] = ['OR', $notEx, ['requiredRaces', RACE_MASK_HORDE, '&']];
|
||||
break;
|
||||
case -2:
|
||||
$parts[] = ['AND', $ex, ['requiredRaces', RACE_MASK_HORDE, '&']];
|
||||
break;
|
||||
case 1:
|
||||
$parts[] = ['OR', $notEx, ['requiredRaces', RACE_MASK_ALLIANCE, '&']];
|
||||
break;
|
||||
case -1:
|
||||
$parts[] = ['AND', $ex, ['requiredRaces', RACE_MASK_ALLIANCE, '&']];
|
||||
break;
|
||||
default:
|
||||
unset($_v['si']);
|
||||
}
|
||||
}
|
||||
|
||||
return $parts;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -7,6 +7,7 @@ if (!defined('AOWOW_REVISION'))
|
||||
class SkillList extends BaseType
|
||||
{
|
||||
public static $type = TYPE_SKILL;
|
||||
public static $brickFile = 'skill';
|
||||
|
||||
protected $queryBase = 'SELECT *, id AS ARRAY_KEY FROM ?_skillLine sl';
|
||||
|
||||
|
||||
@@ -15,12 +15,14 @@ class SpellList extends BaseType
|
||||
public $sources = [];
|
||||
|
||||
public static $type = TYPE_SPELL;
|
||||
public static $brickFile = 'spell';
|
||||
|
||||
public static $skillLines = array(
|
||||
6 => [43, 44, 45, 46, 54, 55, 95, 118, 136, 160, 162, 172, 173, 176, 226, 228, 229, 473], // Weapons
|
||||
8 => [293, 413, 414, 415, 433], // Armor
|
||||
9 => [129, 185, 356, 762], // sec. Professions
|
||||
10 => [98, 109, 111, 113, 115, 137, 138, 139, 140, 141, 313, 315, 673, 759], // Languages
|
||||
11 => [164, 165, 171, 182, 186, 197, 202, 333, 393, 755, 773] // prim. Professions
|
||||
6 => [ 43, 44, 45, 46, 54, 55, 95, 118, 136, 160, 162, 172, 173, 176, 226, 228, 229, 473], // Weapons
|
||||
8 => [293, 413, 414, 415, 433], // Armor
|
||||
9 => [129, 185, 356, 762], // sec. Professions
|
||||
10 => [ 98, 109, 111, 113, 115, 137, 138, 139, 140, 141, 313, 315, 673, 759], // Languages
|
||||
11 => [164, 165, 171, 182, 186, 197, 202, 333, 393, 755, 773] // prim. Professions
|
||||
);
|
||||
public static $spellTypes = array(
|
||||
6 => 1,
|
||||
@@ -1552,14 +1554,7 @@ Lasts 5 min. $?$gte($pl,68)[][Cannot be used on items level 138 and higher.]
|
||||
$org = $this->curTpl['learnedAt'];
|
||||
|
||||
if ($ylw > 1)
|
||||
{
|
||||
return [
|
||||
$org < $ylw ? $org : 0,
|
||||
$org < $grn ? $ylw : 0,
|
||||
$org < $gry ? $grn : 0,
|
||||
$gry
|
||||
];
|
||||
}
|
||||
return [$org, $ylw, $grn, $gry];
|
||||
}
|
||||
|
||||
public function getListviewData()
|
||||
|
||||
@@ -9,6 +9,7 @@ class TitleList extends BaseType
|
||||
use listviewHelper;
|
||||
|
||||
public static $type = TYPE_TITLE;
|
||||
public static $brickFile = 'title';
|
||||
|
||||
public $sources = [];
|
||||
|
||||
|
||||
@@ -7,8 +7,9 @@ if (!defined('AOWOW_REVISION'))
|
||||
class WorldEventList extends BaseType
|
||||
{
|
||||
public static $type = TYPE_WORLDEVENT;
|
||||
public static $brickFile = 'event';
|
||||
|
||||
protected $queryBase = 'SELECT *, -e.id AS ARRAY_KEY, -e.id as id FROM ?_events e';
|
||||
protected $queryBase = 'SELECT *, -e.id as id, -e.id AS ARRAY_KEY FROM ?_events e';
|
||||
protected $queryOpts = array(
|
||||
'e' => ['j' => ['?_holidays h2 ON e.holidayId = h2.id', true], 'o' => '-e.id ASC'],
|
||||
'h' => ['j' => ['?_holidays h ON e.holidayId = h.id']]
|
||||
|
||||
@@ -12,6 +12,7 @@ if (!defined('AOWOW_REVISION'))
|
||||
class ZoneList extends BaseType
|
||||
{
|
||||
public static $type = TYPE_ZONE;
|
||||
public static $brickFile = 'zone';
|
||||
|
||||
protected $queryBase = 'SELECT *, id AS ARRAY_KEY FROM ?_zones z';
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ class SmartyAoWoW extends Smarty
|
||||
$buff = [];
|
||||
foreach ($this->notices as $data)
|
||||
if (User::isInGroup($data[0]))
|
||||
$buff[] = $data[1];
|
||||
$buff[] = Util::jsEscape($data[1]);
|
||||
|
||||
if ($buff)
|
||||
{
|
||||
@@ -182,24 +182,11 @@ class SmartyAoWoW extends Smarty
|
||||
if (isset($jsg[$type]))
|
||||
return;
|
||||
|
||||
switch ($type)
|
||||
{ // [brickFile, [data], [extra]]
|
||||
case TYPE_NPC: $jsg[TYPE_NPC] = ['creatures', [], []]; break;
|
||||
case TYPE_OBJECT: $jsg[TYPE_OBJECT] = ['objects', [], []]; break;
|
||||
case TYPE_ITEM: $jsg[TYPE_ITEM] = ['items', [], []]; break;
|
||||
case TYPE_QUEST: $jsg[TYPE_QUEST] = ['quests', [], []]; break;
|
||||
case TYPE_SPELL: $jsg[TYPE_SPELL] = ['spells', [], []]; break;
|
||||
case TYPE_ZONE: $jsg[TYPE_ZONE] = ['zones', [], []]; break;
|
||||
case TYPE_FACTION: $jsg[TYPE_FACTION] = ['factions', [], []]; break;
|
||||
case TYPE_PET: $jsg[TYPE_PET] = ['pets', [], []]; break;
|
||||
case TYPE_ACHIEVEMENT: $jsg[TYPE_ACHIEVEMENT] = ['achievements', [], []]; break;
|
||||
case TYPE_TITLE: $jsg[TYPE_TITLE] = ['titles', [], []]; break;
|
||||
case TYPE_WORLDEVENT: $jsg[TYPE_WORLDEVENT] = ['holidays', [], []]; break;
|
||||
case TYPE_CLASS: $jsg[TYPE_CLASS] = ['classes', [], []]; break;
|
||||
case TYPE_RACE: $jsg[TYPE_RACE] = ['races', [], []]; break;
|
||||
case TYPE_SKILL: $jsg[TYPE_SKILL] = ['skills', [], []]; break;
|
||||
case TYPE_CURRENCY: $jsg[TYPE_CURRENCY] = ['currencies', [], []]; break;
|
||||
}
|
||||
$jsg[$type] = array(
|
||||
(new ReflectionProperty(Util::$typeClasses[$type], 'brickFile'))->getValue(), // brickfile
|
||||
[], // data
|
||||
[] // extra
|
||||
);
|
||||
}
|
||||
|
||||
private function applyGlobals()
|
||||
@@ -215,25 +202,9 @@ class SmartyAoWoW extends Smarty
|
||||
|
||||
$this->initJSGlobal($type);
|
||||
$ids = array_unique($ids, SORT_NUMERIC);
|
||||
$cnd = [['id', $ids], 0];
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
case TYPE_NPC: (new CreatureList(array(['ct.id', $ids], 0)))->addGlobalsToJscript($this, GLOBALINFO_SELF); break;
|
||||
case TYPE_OBJECT: (new GameobjectList(array(['gt.entry', $ids], 0)))->addGlobalsToJscript($this, GLOBALINFO_SELF); break;
|
||||
case TYPE_ITEM: (new ItemList(array(['i.id', $ids], 0)))->addGlobalsToJscript($this, GLOBALINFO_SELF); break;
|
||||
case TYPE_QUEST: (new QuestList(array(['qt.id', $ids], 0)))->addGlobalsToJscript($this, GLOBALINFO_SELF); break;
|
||||
case TYPE_SPELL: (new SpellList(array(['s.id', $ids], 0)))->addGlobalsToJscript($this, GLOBALINFO_SELF); break;
|
||||
case TYPE_ZONE: (new ZoneList(array(['z.id', $ids], 0)))->addGlobalsToJscript($this, GLOBALINFO_SELF); break;
|
||||
case TYPE_FACTION: (new FactionList(array(['id', $ids], 0)))->addGlobalsToJscript($this, GLOBALINFO_SELF); break;
|
||||
case TYPE_PET: (new PetList(array(['id', $ids], 0)))->addGlobalsToJscript($this, GLOBALINFO_SELF); break;
|
||||
case TYPE_ACHIEVEMENT: (new AchievementList(array(['id', $ids], 0)))->addGlobalsToJscript($this, GLOBALINFO_SELF); break;
|
||||
case TYPE_TITLE: (new TitleList(array(['id', $ids], 0)))->addGlobalsToJscript($this, GLOBALINFO_SELF); break;
|
||||
case TYPE_WORLDEVENT: (new WorldEventList(array(['id', $ids], 0)))->addGlobalsToJscript($this, GLOBALINFO_SELF); break;
|
||||
case TYPE_CLASS: (new CharClassList(array(['id', $ids], 0)))->addGlobalsToJscript($this, GLOBALINFO_SELF); break;
|
||||
case TYPE_RACE: (new CharRaceList(array(['id', $ids], 0)))->addGlobalsToJscript($this, GLOBALINFO_SELF); break;
|
||||
case TYPE_SKILL: (new SkillList(array(['id', $ids], 0)))->addGlobalsToJscript($this, GLOBALINFO_SELF); break;
|
||||
case TYPE_CURRENCY: (new CurrencyList(array(['id', $ids], 0)))->addGlobalsToJscript($this, GLOBALINFO_SELF); break;
|
||||
}
|
||||
(new Util::$typeClasses[$type]($cnd))->addGlobalsToJscript($this, GLOBALINFO_SELF);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,7 +270,7 @@ class SmartyAoWoW extends Smarty
|
||||
$cache = explode("\n", $cache);
|
||||
|
||||
@list($time, $rev) = explode(' ', $cache[0]);
|
||||
$expireTime = $time + $this->config['page']['cacheTimer'];
|
||||
$expireTime = $time + $this->config['cacheTimer'];
|
||||
if ($expireTime <= time() || $rev < AOWOW_REVISION)
|
||||
return false;
|
||||
|
||||
@@ -329,6 +300,12 @@ class Util
|
||||
'www', null, 'fr', 'de', null, null, 'es', null, 'ru'
|
||||
);
|
||||
|
||||
public static $typeClasses = array(
|
||||
null, 'CreatureList', 'GameObjectList', 'ItemList', 'ItemsetList', 'QuestList', 'SpellList',
|
||||
'ZoneList', 'FactionList', 'PetList', 'AchievementList', 'TitleList', 'WorldEventList', 'CharClassList',
|
||||
'CharRaceList', 'SkillList', null, 'CurrencyList'
|
||||
);
|
||||
|
||||
public static $typeStrings = array( // zero-indexed
|
||||
null, 'npc', 'object', 'item', 'itemset', 'quest', 'spell', 'zone', 'faction',
|
||||
'pet', 'achievement', 'title', 'event', 'class', 'race', 'skill', null, 'currency'
|
||||
@@ -497,7 +474,7 @@ class Util
|
||||
LOOT_SKINNING, // npc (see its flags for mining, herbing or actual skinning)
|
||||
LOOT_FISHING, // zone
|
||||
LOOT_GAMEOBJECT, // object
|
||||
LOOT_QUEST, // quest (mail rewards)
|
||||
LOOT_MAIL, // quest || achievement
|
||||
LOOT_SPELL // spell
|
||||
);
|
||||
|
||||
@@ -1117,11 +1094,13 @@ class Util
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(($s['d'] + $s['h']) % 365)) // whole years
|
||||
$_ = $s['d'] + $s['h'];
|
||||
|
||||
if ($_ && !($_ % 365)) // whole years
|
||||
return round(($s['d'] + $s['h'] *24) / 365, 2)." ".Lang::$timeUnits[$s['d'] / 365 == 1 && !$s['h'] ? 'sg' : 'pl'][0];
|
||||
if (!(($s['d'] + $s['h']) % 30)) // whole month
|
||||
if ($_ && !($_ % 30)) // whole month
|
||||
return round(($s['d'] + $s['h'] * 24) / 30, 2)." ".Lang::$timeUnits[$s['d'] / 30 == 1 && !$s['h'] ? 'sg' : 'pl'][1];
|
||||
if (!(($s['d'] + $s['h']) % 7)) // whole weeks
|
||||
if ($_ && !($_ % 7)) // whole weeks
|
||||
return round(($s['d'] + $s['h'] * 24) / 7, 2)." ".Lang::$timeUnits[$s['d'] / 7 == 1 && !$s['h'] ? 'sg' : 'pl'][2];
|
||||
if ($s['d'])
|
||||
return round($s['d'] + $s['h'] / 24, 2)." ".Lang::$timeUnits[$s['d'] == 1 && !$s['h'] ? 'sg' : 'pl'][3];
|
||||
@@ -1193,6 +1172,8 @@ class Util
|
||||
// html may contain 'Pictures'
|
||||
$text = preg_replace('/"Interface\\\Pictures\\\([\w_\-]+)"/i', '"images/interface/Pictures/\1.jpg"', strtr($text, $pairs));
|
||||
}
|
||||
else
|
||||
$text = strtr($text, ["\n" => '<br />', "\r" => '']);
|
||||
|
||||
$from = array(
|
||||
'/\|T([\w]+\\\)*([^\.]+)\.blp:\d+\|t/ui', // images (force size to tiny) |T<fullPath>:<size>|t
|
||||
@@ -1221,8 +1202,6 @@ class Util
|
||||
'$N' => '<'.Lang::$main['name'].'>',
|
||||
'$b' => '<br />',
|
||||
'$B' => '<br />',
|
||||
"\n" => '<br />',
|
||||
"\r" => '',
|
||||
'|n' => '' // what .. the fuck .. another type of line terminator? (only in spanish though)
|
||||
);
|
||||
|
||||
@@ -1479,8 +1458,8 @@ class Util
|
||||
{
|
||||
case 0: // no params works always
|
||||
return true;
|
||||
case 1: // null is avalid || key in a n-dim-array || value in a 1-dim-array
|
||||
return $keys[0] === null || isset($struct[$keys[0]]) || in_array($keys[0], $struct);
|
||||
case 1: // null is avalid || value in a 1-dim-array || key in a n-dim-array
|
||||
return $keys[0] === null || in_array($keys[0], $struct) || (isset($struct[$keys[0]]));
|
||||
case 2: // first param has to be a key. otherwise invalid
|
||||
if (!isset($struct[$keys[0]]))
|
||||
return false;
|
||||
@@ -1868,23 +1847,24 @@ class Util
|
||||
|
||||
// [fileName, tabData, tabName, tabId, extraCols, hiddenCols, visibleCols]
|
||||
$tabsFinal = array(
|
||||
['item', [], '$LANG.tab_containedin', 'contained-in-item', [], [], []],
|
||||
['item', [], '$LANG.tab_disenchantedfrom', 'disenchanted-from', [], [], []],
|
||||
['item', [], '$LANG.tab_prospectedfrom', 'prospected-from', [], [], []],
|
||||
['item', [], '$LANG.tab_milledfrom', 'milled-from', [], [], []],
|
||||
['creature', [], '$LANG.tab_droppedby', 'dropped-by', [], [], []],
|
||||
['creature', [], '$LANG.tab_pickpocketedfrom', 'pickpocketed-from', [], [], []],
|
||||
['creature', [], '$LANG.tab_skinnedfrom', 'skinned-from', [], [], []],
|
||||
['creature', [], '$LANG.tab_minedfromnpc', 'mined-from-npc', [], [], []],
|
||||
['creature', [], '$LANG.tab_salvagedfrom', 'salvaged-from', [], [], []],
|
||||
['creature', [], '$LANG.tab_gatheredfromnpc', 'gathered-from-npc', [], [], []],
|
||||
['quest', [], '$LANG.tab_rewardfrom', 'reward-from-quest', [], [], []],
|
||||
['zone', [], '$LANG.tab_fishedin', 'fished-in-zone', [], [], []],
|
||||
['object', [], '$LANG.tab_containedin', 'contained-in-object', [], [], []],
|
||||
['object', [], '$LANG.tab_minedfrom', 'mined-from-object', [], [], []],
|
||||
['object', [], '$LANG.tab_gatheredfrom', 'gathered-from-object', [], [], []],
|
||||
['object', [], '$LANG.tab_fishedin', 'fished-in-object', [], [], []],
|
||||
['spell', [], '$LANG.tab_createdby', 'created-by', [], [], []]
|
||||
['item', [], '$LANG.tab_containedin', 'contained-in-item', [], [], []],
|
||||
['item', [], '$LANG.tab_disenchantedfrom', 'disenchanted-from', [], [], []],
|
||||
['item', [], '$LANG.tab_prospectedfrom', 'prospected-from', [], [], []],
|
||||
['item', [], '$LANG.tab_milledfrom', 'milled-from', [], [], []],
|
||||
['creature', [], '$LANG.tab_droppedby', 'dropped-by', [], [], []],
|
||||
['creature', [], '$LANG.tab_pickpocketedfrom', 'pickpocketed-from', [], [], []],
|
||||
['creature', [], '$LANG.tab_skinnedfrom', 'skinned-from', [], [], []],
|
||||
['creature', [], '$LANG.tab_minedfromnpc', 'mined-from-npc', [], [], []],
|
||||
['creature', [], '$LANG.tab_salvagedfrom', 'salvaged-from', [], [], []],
|
||||
['creature', [], '$LANG.tab_gatheredfromnpc', 'gathered-from-npc', [], [], []],
|
||||
['quest', [], '$LANG.tab_rewardfrom', 'reward-from-quest', [], [], []],
|
||||
['zone', [], '$LANG.tab_fishedin', 'fished-in-zone', [], [], []],
|
||||
['object', [], '$LANG.tab_containedin', 'contained-in-object', [], [], []],
|
||||
['object', [], '$LANG.tab_minedfrom', 'mined-from-object', [], [], []],
|
||||
['object', [], '$LANG.tab_gatheredfrom', 'gathered-from-object', [], [], []],
|
||||
['object', [], '$LANG.tab_fishedin', 'fished-in-object', [], [], []],
|
||||
['spell', [], '$LANG.tab_createdby', 'created-by', [], [], []],
|
||||
['achievement', [], '$LANG.tab_rewardfrom', 'reward-from-achievemnt', [], [], []]
|
||||
);
|
||||
$refResults = [];
|
||||
$chanceMods = [];
|
||||
@@ -2027,7 +2007,7 @@ class Util
|
||||
if (!$ids)
|
||||
break;
|
||||
|
||||
$srcObj = new GameObjectList(array(['type', [OBJECT_CHEST, OBJECT_FISHINGHOLE]], ['data1', $ids]));
|
||||
$srcObj = new GameObjectList(array(['lootId', $ids]));
|
||||
if ($srcObj->error)
|
||||
break;
|
||||
|
||||
@@ -2049,7 +2029,7 @@ class Util
|
||||
$tabsFinal[$tabId][6][] = 'skill';
|
||||
}
|
||||
break;
|
||||
case LOOT_QUEST:
|
||||
case LOOT_MAIL:
|
||||
$conditions = array(['RewardChoiceItemId1', $itemId], ['RewardChoiceItemId2', $itemId], ['RewardChoiceItemId3', $itemId], ['RewardChoiceItemId4', $itemId], ['RewardChoiceItemId5', $itemId],
|
||||
['RewardChoiceItemId6', $itemId], ['RewardItemId1', $itemId], ['RewardItemId2', $itemId], ['RewardItemId3', $itemId], ['RewardItemId4', $itemId],
|
||||
'OR');
|
||||
@@ -2065,6 +2045,13 @@ class Util
|
||||
foreach ($srcObj->iterate() as $_)
|
||||
$tabsFinal[10][1][] = array_merge($srcData[$srcObj->id], empty($result[$srcObj->id]) ? ['percent' => -1] : $result[$srcObj->id]);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
todo: search for achievements here
|
||||
$tabsFinal[17]
|
||||
*/
|
||||
|
||||
break;
|
||||
case LOOT_SPELL:
|
||||
$conditions = ['OR', ['effect1CreateItemId', $itemId], ['effect2CreateItemId', $itemId], ['effect3CreateItemId', $itemId]];
|
||||
|
||||
@@ -16,6 +16,7 @@ class Lang
|
||||
public static $currency;
|
||||
public static $event;
|
||||
public static $faction;
|
||||
public static $gameObject;
|
||||
public static $item;
|
||||
public static $itemset;
|
||||
public static $maps;
|
||||
@@ -68,7 +69,7 @@ class Lang
|
||||
$locks = [];
|
||||
$lock = DB::Aowow()->selectRow('SELECT * FROM ?_lock WHERE id = ?d', $lockId);
|
||||
if (!$lock)
|
||||
return '';
|
||||
return $locks;
|
||||
|
||||
for ($i = 1; $i <= 5; $i++)
|
||||
{
|
||||
@@ -91,8 +92,7 @@ class Lang
|
||||
if (!in_array($prop, [1, 2, 3, 4, 9, 16, 20]))
|
||||
continue;
|
||||
|
||||
$txt = DB::Aowow()->selectRow('SELECT * FROM ?_locktype WHERE id = ?d', $prop); // todo (low): convert to static text
|
||||
$name = Util::localizedString($txt, 'name');
|
||||
$name = Lang::$spell['lockType'][$prop];
|
||||
if (!$name)
|
||||
continue;
|
||||
|
||||
@@ -117,7 +117,7 @@ class Lang
|
||||
else
|
||||
continue;
|
||||
|
||||
$locks[$lock['type'.$i] == 1 ? $i : -$i] = sprintf(Lang::$game['requires'], $name);
|
||||
$locks[$lock['type'.$i] == 1 ? $prop : -$prop] = sprintf(Lang::$game['requires'], $name);
|
||||
}
|
||||
|
||||
return $locks;
|
||||
|
||||
@@ -31,6 +31,7 @@ $lang = array(
|
||||
'pageNotFound' => "Diese|Dieser|Dieses %s existiert nicht.", // todo: dämliche Fälle...
|
||||
'gender' => "Geschlecht",
|
||||
'sex' => [null, 'Mann', 'Frau'],
|
||||
'players' => "Spieler",
|
||||
'quickFacts' => "Kurzübersicht",
|
||||
'screenshots' => "Screenshots",
|
||||
'videos' => "Videos",
|
||||
@@ -65,6 +66,7 @@ $lang = array(
|
||||
'refineSearch' => "Tipp: Präzisiere deine Suche mit Durchsuchen einer <a href=\"javascript:;\" id=\"fi_subcat\">Unterkategorie</a>.",
|
||||
'clear' => "leeren",
|
||||
'exactMatch' => "Exakt passend",
|
||||
'_reqLevel' => "Mindeststufe",
|
||||
|
||||
// infobox
|
||||
'unavailable' => "Nicht für Spieler verfügbar",
|
||||
@@ -141,12 +143,15 @@ $lang = array(
|
||||
'itemsets' => "Ausrüstungssets",
|
||||
'mechanic' => "Auswirkung",
|
||||
'mechAbbr' => "Ausw.",
|
||||
'meetingStone' => "Versammlungsstein",
|
||||
'npc' => "NPC",
|
||||
'npcs' => "NPCs",
|
||||
'pet' => "Begleiter",
|
||||
'pets' => "Begleiter",
|
||||
'profile' => "",
|
||||
'profiles' => "Profile",
|
||||
'quest' => "Quest",
|
||||
'quests' => "Quests",
|
||||
'requires' => "Benötigt %s",
|
||||
'requires2' => "Benötigt",
|
||||
'reqLevel' => "Benötigt Stufe %s",
|
||||
@@ -260,6 +265,17 @@ $lang = array(
|
||||
'publicDesc' => "Öffentliche Beschreibung",
|
||||
'viewPubDesc' => "Die Beschreibung in deinem <a href=\"?user=%s\">öffentlichen Profil</a> ansehen",
|
||||
),
|
||||
'gameObject' => array(
|
||||
'cat' => [0 => "Anderes", 9 => "Bücher", 3 => "Behälter", -5 => "Truhen", 25 => "Fischschwärme", -3 => "Kräuter", -4 => "Erzadern", -2 => "Quest", -6 => "Werkzeuge"],
|
||||
'type' => [ 9 => "Buch", 3 => "Behälter", -5 => "Truhe", 25 => "", -3 => "Kraut", -4 => "Erzvorkommen", -2 => "Quest", -6 => ""],
|
||||
'unkPosition' => "Der Standort dieses Objekts ist nicht bekannt.",
|
||||
'key' => "Schlüssel",
|
||||
'focus' => "Zauberfokus",
|
||||
'focusDesc' => "Zauber, die diesen Fokus benötigen, können an diesem Objekt gewirkt werden.",
|
||||
'trap' => "Falle",
|
||||
'triggeredBy' => "Ausgelöst durch",
|
||||
'capturePoint' => "Eroberungspunkt"
|
||||
),
|
||||
'npc' => array(
|
||||
'rank' => [0 => "Normal", 1 => "Elite", 4 => "Rar", 2 => "Rar Elite", 3 => "Boss"],
|
||||
'classification'=> "Einstufung",
|
||||
@@ -272,6 +288,7 @@ $lang = array(
|
||||
'gainsDesc' => "Nach dem Töten dieses NPCs erhaltet Ihr",
|
||||
'repWith' => "Ruf mit der Fraktion",
|
||||
'stopsAt' => "Stoppt bei %s",
|
||||
'vehicle' => "Fahrzeug",
|
||||
'textTypes' => [null, "schreit", "sagt", "flüstert"],
|
||||
'modes' => array(
|
||||
1 => ["Normal", "Heroisch"],
|
||||
@@ -330,9 +347,13 @@ $lang = array(
|
||||
)
|
||||
),
|
||||
'quest' => array(
|
||||
'level' => 'Stufe %s',
|
||||
'questLevel' => 'Stufe %s',
|
||||
'daily' => 'Täglich',
|
||||
'requirements' => 'Anforderungen'
|
||||
'requirements' => 'Anforderungen',
|
||||
'questInfo' => array(
|
||||
0 => 'Normal', 1 => 'Gruppe', 21 => 'Leben', 41 => 'PvP', 62 => 'Schlachtzug', 81 => 'Dungeon', 82 => 'Weltereignis',
|
||||
83 => 'Legendär', 84 => 'Eskorte', 85 => 'Heroisch', 88 => 'Schlachtzug (10)', 89 => 'Schlachtzug (25)'
|
||||
)
|
||||
),
|
||||
'title' => array(
|
||||
'cat' => array(
|
||||
@@ -359,7 +380,13 @@ $lang = array(
|
||||
'spillover' => "Reputationsüberlauf",
|
||||
'spilloverDesc' => "Für diese Fraktion erhaltener Ruf wird zusätzlich mit den unten aufgeführten Fraktionen anteilig verrechnet.",
|
||||
'maxStanding' => "Max. Ruf",
|
||||
'quartermaster' => "Rüstmeister"
|
||||
'quartermaster' => "Rüstmeister",
|
||||
'cat' => array(
|
||||
1118 => ["Classic", 469 => "Allianz", 169 => "Dampfdruckkartell", 67 => "Horde", 891 => "Streitkräfte der Allianz", 892 => "Streitkräfte der Horde"],
|
||||
980 => ["The Burning Crusade", 936 => "Shattrath"],
|
||||
1097 => ["Wrath of the Lich King", 1052 => "Expedition der Horde", 1117 => "Sholazarbecken", 1037 => "Vorposten der Allianz"],
|
||||
0 => "Sonstige"
|
||||
)
|
||||
),
|
||||
'itemset' => array(
|
||||
'_desc' => "<b>%s</b> ist das <b>%s</b>. Es enthält %s Teile.",
|
||||
@@ -576,7 +603,6 @@ $lang = array(
|
||||
'_unavailable' => "Dieser Gegenstand ist nicht für Spieler verfügbar.",
|
||||
'_rndEnchants' => "Zufällige Verzauberungen",
|
||||
'_chance' => "(Chance von %s%%)",
|
||||
'_reqLevel' => "Mindeststufe",
|
||||
'reqRating' => "Benötigt eine persönliche Arenawertung und Teamwertung von %d.",
|
||||
'slot' => "Platz",
|
||||
'_quality' => "Qualität",
|
||||
|
||||
@@ -26,6 +26,7 @@ $lang = array(
|
||||
'pageNotFound' => "This %s doesn't exist.",
|
||||
'gender' => "Gender",
|
||||
'sex' => [null, 'Male', 'Female'],
|
||||
'players' => "Players",
|
||||
'quickFacts' => "Quick Facts",
|
||||
'screenshots' => "Screenshots",
|
||||
'videos' => "Videos",
|
||||
@@ -52,6 +53,7 @@ $lang = array(
|
||||
'refineSearch' => "Tip: Refine your search by browsing a <a href=\"javascript:;\" id=\"fi_subcat\">subcategory</a>.",
|
||||
'clear' => "clear",
|
||||
'exactMatch' => "Exact match",
|
||||
'_reqLevel' => "Required level",
|
||||
|
||||
// infobox
|
||||
'unavailable' => "Not available to players", // alternative wording found: "No longer available to players" ... aw screw it <_<
|
||||
@@ -128,12 +130,15 @@ $lang = array(
|
||||
'itemsets' => "Item Sets",
|
||||
'mechanic' => "Mechanic",
|
||||
'mechAbbr' => "Mech.",
|
||||
'meetingStone' => "Meeting Stone",
|
||||
'npc' => "NPC",
|
||||
'npcs' => "NPCs",
|
||||
'pet' => "Pet",
|
||||
'pets' => "Hunter Pets",
|
||||
'profile' => "profile",
|
||||
'profiles' => "Profiles",
|
||||
'quest' => "quest",
|
||||
'quests' => "Quests",
|
||||
'requires' => "Requires %s",
|
||||
'requires2' => "Requires",
|
||||
'reqLevel' => "Requires Level %s",
|
||||
@@ -247,7 +252,18 @@ $lang = array(
|
||||
'publicDesc' => "Public Description",
|
||||
'viewPubDesc' => "View your Public Description in your <a href=\"?user=%s\">Profile Page</a>",
|
||||
),
|
||||
'npc' => array(
|
||||
'gameObject' => array(
|
||||
'cat' => [0 => "Other", 9 => "Books", 3 => "Containers", -5 => "Chests", 25 => "Fishing Pools", -3 => "Herbs", -4 => "Mineral Veins", -2 => "Quest", -6 => "Tools"],
|
||||
'type' => [ 9 => "Book", 3 => "Container", -5 => "Chest", 25 => "", -3 => "Herb", -4 => "Mineral Vein", -2 => "Quest", -6 => ""],
|
||||
'unkPosition' => "The location of this object is unknown.",
|
||||
'key' => "Key",
|
||||
'focus' => "Spell Focus",
|
||||
'focusDesc' => "Spells requiring this Focus can be cast near this Object",
|
||||
'trap' => "Trap",
|
||||
'triggeredBy' => "Triggered by",
|
||||
'capturePoint' => "Capture Point"
|
||||
),
|
||||
'npc' => array(
|
||||
'rank' => [0 => "Normal", 1 => "Elite", 4 => "Rare", 2 => "Rare Elite", 3 => "Boss"],
|
||||
'classification'=> "Classification",
|
||||
'petFamily' => "Pet familiy",
|
||||
@@ -259,6 +275,7 @@ $lang = array(
|
||||
'gainsDesc' => "After killing this NPC you will gain",
|
||||
'repWith' => "reputation with",
|
||||
'stopsAt' => "stops at %s",
|
||||
'vehicle' => "Vehicle",
|
||||
'textTypes' => [null, "yells", "says", "whispers"],
|
||||
'modes' => array(
|
||||
1 => ["Normal", "Heroic"],
|
||||
@@ -317,9 +334,13 @@ $lang = array(
|
||||
)
|
||||
),
|
||||
'quest' => array(
|
||||
'level' => 'Level %s',
|
||||
'questLevel' => 'Level %s',
|
||||
'daily' => 'Daily',
|
||||
'requirements' => 'Requirements'
|
||||
'requirements' => 'Requirements',
|
||||
'questInfo' => array(
|
||||
0 => 'Normal', 1 => 'Group', 21 => 'Life', 41 => 'PvP', 62 => 'Raid', 81 => 'Dungeon', 82 => 'World Event',
|
||||
83 => 'Legendary', 84 => 'Escort', 85 => 'Heroic', 88 => 'Raid (10)', 89 => 'Raid (25)'
|
||||
)
|
||||
),
|
||||
'title' => array(
|
||||
'cat' => array(
|
||||
@@ -346,7 +367,13 @@ $lang = array(
|
||||
'spillover' => "Reputation Spillover",
|
||||
'spilloverDesc' => "Gaining Reputation with this faction also yields a proportional gain with the factions listed below.",
|
||||
'maxStanding' => "Max. Standing",
|
||||
'quartermaster' => "Quartermaster"
|
||||
'quartermaster' => "Quartermaster",
|
||||
'cat' => array(
|
||||
1118 => ["Classic", 469 => "Alliance", 169 => "Steamwheedle Cartel", 67 => "Horde", 891 => "Alliance Forces", 892 => "Horde Forces"],
|
||||
980 => ["The Burning Crusade", 936 => "Shattrath City"],
|
||||
1097 => ["Wrath of the Lich King", 1052 => "Horde Expedition", 1117 => "Sholazar Basin", 1037 => "Alliance Vanguard"],
|
||||
0 => "Other"
|
||||
)
|
||||
),
|
||||
'itemset' => array(
|
||||
'_desc' => "<b>%s</b> is the <b>%s</b>. It contains %s pieces.",
|
||||
@@ -563,7 +590,6 @@ $lang = array(
|
||||
'_unavailable' => "This item is not available to players.",
|
||||
'_rndEnchants' => "Random Enchantments",
|
||||
'_chance' => "(%s%% chance)",
|
||||
'_reqLevel' => "Required level",
|
||||
'reqRating' => "Requires personal and team arena rating of %d<br />in 3v3 or 5v5 brackets",
|
||||
'slot' => "Slot",
|
||||
'_quality' => "Quality",
|
||||
|
||||
@@ -31,6 +31,7 @@ $lang = array(
|
||||
'pageNotFound' => "Este %s no existe.",
|
||||
'gender' => "Género",
|
||||
'sex' => [null, 'Hombre', 'Mujer'],
|
||||
'players' => "Jugadores",
|
||||
'quickFacts' => "Notas rápidas",
|
||||
'screenshots' => "Capturas de pantalla",
|
||||
'videos' => "Videos",
|
||||
@@ -57,6 +58,7 @@ $lang = array(
|
||||
'refineSearch' => "Sugerencia: Refina tu búsqueda llendo a una <a href=\"javascript:;\" id=\"fi_subcat\">subcategoría</a>.",
|
||||
'clear' => "borrar",
|
||||
'exactMatch' => "Coincidencia exacta",
|
||||
'_reqLevel' => "Nivel requerido",
|
||||
|
||||
// infobox
|
||||
'unavailable' => "No está disponible a los jugadores",
|
||||
@@ -133,12 +135,15 @@ $lang = array(
|
||||
'itemsets' => "Conjuntos de objetos",
|
||||
'mechanic' => "Mecanica",
|
||||
'mechAbbr' => "Mec.",
|
||||
'meetingStone' => "Roca de encuentro",
|
||||
'npc' => "PNJ",
|
||||
'npcs' => "PNJs",
|
||||
'pet' => "Mascota",
|
||||
'pets' => "Mascotas de cazador",
|
||||
'profile' => "",
|
||||
'profiles' => "Perfiles",
|
||||
'quest' => "misión",
|
||||
'quests' => "Misiones",
|
||||
'requires' => "Requiere %s",
|
||||
'requires2' => "Requiere",
|
||||
'reqLevel' => "Necesitas ser de nivel %s",
|
||||
@@ -218,6 +223,17 @@ $lang = array(
|
||||
'goForum' => "Feedback <a href=\"?forums&board=1\">forum</a>",
|
||||
),
|
||||
'account' => [],
|
||||
'gameObject' => array(
|
||||
'cat' => [0 => "Otros", 9 => "Libros", 3 => "Contenedores", -5 => "Cofres", 25 => "[Fishing Pools]", -3 => "Hierbas", -4 => "Venas de minerales", -2 => "Misiones", -6 => "Herramientas"],
|
||||
'type' => [ 9 => "Libro", 3 => "Contenedore", -5 => "Cofre", 25 => "", -3 => "Hierba", -4 => "Filóne de mineral", -2 => "Misión", -6 => ""],
|
||||
'unkPosition' => "No se conoce la ubicación de esta entidad.",
|
||||
'key' => "Llave",
|
||||
'focus' => "[Spell Focus]",
|
||||
'focusDesc' => "[Spells requiring this Focus can be cast near this Object]",
|
||||
'trap' => "Trampa",
|
||||
'triggeredBy' => "Accionado por",
|
||||
'capturePoint' => "Punto de captura"
|
||||
),
|
||||
'npc' => array(
|
||||
'rank' => [0 => "Normal", 1 => "Élite", 4 => "Raro", 2 => "Élite raro", 3 => "Jefe"],
|
||||
'classification'=> "Clasificación",
|
||||
@@ -230,6 +246,7 @@ $lang = array(
|
||||
'gainsDesc' => "Tras acabar con este PNJ ganarás",
|
||||
'repWith' => "reputación con",
|
||||
'stopsAt' => "se detiene en %s",
|
||||
'vehicle' => "Vehículo",
|
||||
'textTypes' => [null, "grita", "dice", "susurra"],
|
||||
'modes' => array(
|
||||
1 => ["Normal", "Heroico"],
|
||||
@@ -288,9 +305,13 @@ $lang = array(
|
||||
)
|
||||
),
|
||||
'quest' => array(
|
||||
'level' => 'Nivel %s',
|
||||
'questLevel' => 'Nivel %s',
|
||||
'daily' => 'Diaria',
|
||||
'requirements' => 'Requisitos'
|
||||
'requirements' => 'Requisitos',
|
||||
'questInfo' => array(
|
||||
0 => 'Normal', 1 => 'Élite', 21 => 'Vida', 41 => 'JcJ', 62 => 'Banda', 81 => 'Mazmorra', 82 => 'Evento del mundo',
|
||||
83 => 'Legendaria', 84 => 'Escolta', 85 => 'Heroica', 88 => 'Banda (10)', 89 => 'Banda (25)'
|
||||
)
|
||||
),
|
||||
'title' => array(
|
||||
'cat' => array(
|
||||
@@ -317,7 +338,13 @@ $lang = array(
|
||||
'spillover' => "[Reputation Spillover]",
|
||||
'spilloverDesc' => "[Gaining Reputation with this faction also yields a proportional gain with the factions listed below.]",
|
||||
'maxStanding' => "Posición máxima",
|
||||
'quartermaster' => "Intendente"
|
||||
'quartermaster' => "Intendente",
|
||||
'cat' => array(
|
||||
1118 => ["Clásicas", 469 => "Alianza", 169 => "Cártel Bonvapor", 67 => "Horda", 891 => "Fuerzas de la Alianza", 892 => "Fuerzas de la Horda"],
|
||||
980 => ["The Burning Crusade", 936 => "Ciudad de Shattrath"],
|
||||
1097 => ["Wrath of the Lich King", 1052 => "Expedición de la Horda", 1117 => "Cuenca de Sholazar", 1037 => "Vanguardia de la Alianza"],
|
||||
0 => "Otros"
|
||||
)
|
||||
),
|
||||
'itemset' => array(
|
||||
'_desc' => "<b>%s</b> es el <b>%s</b>. Contiene %s piezas.",
|
||||
@@ -534,7 +561,6 @@ $lang = array(
|
||||
'_unavailable' => "Este objeto no está disponible para los jugadores.",
|
||||
'_rndEnchants' => "Encantamientos aleatorios",
|
||||
'_chance' => "(probabilidad %s%%)",
|
||||
'_reqLevel' => "Nivel requerido",
|
||||
'reqRating' => "Requiere un índice de arena personal y de equipo de %d",
|
||||
'slot' => "Casilla",
|
||||
'_quality' => "Calidad",
|
||||
|
||||
@@ -31,6 +31,7 @@ $lang = array(
|
||||
'pageNotFound' => "Ce %s n'existe pas.",
|
||||
'gender' => "Genre",
|
||||
'sex' => [null, 'Homme', 'Femme'],
|
||||
'players' => "Joueurs",
|
||||
'quickFacts' => "En bref",
|
||||
'screenshots' => "Captures d'écran",
|
||||
'videos' => "Vidéos",
|
||||
@@ -57,6 +58,7 @@ $lang = array(
|
||||
'refineSearch' => "Astuce : Affinez votre recherche en utilisant une <a href=\"javascript:;\" id=\"fi_subcat\">sous-catégorie</a>.",
|
||||
'clear' => "effacer",
|
||||
'exactMatch' => "Concordance exacte",
|
||||
'_reqLevel' => "Niveau requis",
|
||||
|
||||
// infobox
|
||||
'unavailable' => "Non disponible aux joueurs",
|
||||
@@ -133,12 +135,15 @@ $lang = array(
|
||||
'itemsets' => "Ensembles d'objets",
|
||||
'mechanic' => "Mécanique",
|
||||
'mechAbbr' => "Mécan.",
|
||||
'meetingStone' => "Pierre de rencontre",
|
||||
'npc' => "PNJ",
|
||||
'npcs' => "PNJs",
|
||||
'pet' => "Familier",
|
||||
'pets' => "Familiers de chasseur",
|
||||
'profile' => "",
|
||||
'profiles' => "Profils",
|
||||
'quest' => "quête",
|
||||
'quests' => "Quêtes",
|
||||
'requires' => "%s requis",
|
||||
'requires2' => "Requiert",
|
||||
'reqLevel' => "Niveau %s requis",
|
||||
@@ -218,6 +223,17 @@ $lang = array(
|
||||
'goForum' => "Feedback <a href=\"?forums&board=1\">forum</a>",
|
||||
),
|
||||
'account' => [],
|
||||
'gameObject' => array(
|
||||
'cat' => [0 => "Autre", 9 => "Livres", 3 => "Conteneurs", -5 => "Coffres", 25 => "Bancs de poissons", -3 => "Herbes", -4 => "Filons de minerai", -2 => "Quêtes", -6 => "Outils"],
|
||||
'type' => [ 9 => "Livre", 3 => "Conteneur", -5 => "Coffre", 25 => "", -3 => "Herbe", -4 => "Filon de minerai", -2 => "Quête", -6 => ""],
|
||||
'unkPosition' => "L'emplacement de cette entité est inconnu.",
|
||||
'key' => "Clé",
|
||||
'focus' => "[Spell Focus]",
|
||||
'focusDesc' => "[Spells requiring this Focus can be cast near this Object]",
|
||||
'trap' => "Piège",
|
||||
'triggeredBy' => "Déclenché par",
|
||||
'capturePoint' => "Point de capture"
|
||||
),
|
||||
'npc' => array(
|
||||
'rank' => [0 => "Standard", 1 => "Élite", 4 => "Rare", 2 => "Élite rare", 3 =>"Boss"],
|
||||
'classification'=> "Classification",
|
||||
@@ -230,6 +246,7 @@ $lang = array(
|
||||
'gainsDesc' => "Après avoir tué ce PNJ vous allez obtenir",
|
||||
'repWith' => "points de réputation avec",
|
||||
'stopsAt' => "arrête à %s",
|
||||
'vehicle' => "Véhicule",
|
||||
'textTypes' => [null, "crie", "dit", "chuchote"],
|
||||
'modes' => array(
|
||||
1 => ["Normal", "Héroïque"],
|
||||
@@ -288,9 +305,13 @@ $lang = array(
|
||||
)
|
||||
),
|
||||
'quest' => array(
|
||||
'level' => 'Niveau %s',
|
||||
'questLevel' => 'Niveau %s',
|
||||
'daily' => 'Journalière',
|
||||
'requirements' => 'Conditions'
|
||||
'requirements' => 'Conditions',
|
||||
'questInfo' => array(
|
||||
0 => 'Standard', 1 => 'Groupe', 21 => 'Vie', 41 => 'JcJ', 62 => 'Raid', 81 => 'Donjon', 82 => 'Évènement mondial',
|
||||
83 => 'Légendaire', 84 => 'Escorte', 85 => 'Héroïque', 88 => 'Raid (10)', 89 => 'Raid (25)'
|
||||
)
|
||||
),
|
||||
'title' => array(
|
||||
'cat' => array(
|
||||
@@ -317,7 +338,13 @@ $lang = array(
|
||||
'spillover' => "[Reputation Spillover]",
|
||||
'spilloverDesc' => "[Gaining Reputation with this faction also yields a proportional gain with the factions listed below.]",
|
||||
'maxStanding' => "Niveau maximum",
|
||||
'quartermaster' => "Intendant"
|
||||
'quartermaster' => "Intendant",
|
||||
'cat' => array(
|
||||
1118 => ["Classique", 469 => "Alliance", 169 => "Cartel Gentepression", 67 => "Horde", 891 => "Forces de l'Alliance", 892 => "Forces de la Horde"],
|
||||
980 => ["The Burning Crusade", 936 => "Shattrath"],
|
||||
1097 => ["Wrath of the Lich King", 1052 => "Expédition de la Horde", 1117 => "Bassin de Sholazar", 1037 => "Avant-garde de l'Alliance"],
|
||||
0 => "Autre"
|
||||
)
|
||||
),
|
||||
'itemset' => array(
|
||||
'_desc' => "<b>%s</b> est le <b>%s</b>. Il contient %s pièces.",
|
||||
@@ -534,7 +561,6 @@ $lang = array(
|
||||
'_unavailable' => "Este objeto no está disponible para los jugadores.",
|
||||
'_rndEnchants' => "Enchantements aléatoires",
|
||||
'_chance' => "(%s%% de chance)",
|
||||
'_reqLevel' => "Niveau requis",
|
||||
'reqRating' => "Nécessite une cote d'arène personnelle et en équipe de %d<br />en arène de 3c3 ou 5c5.",
|
||||
'slot' => "Emplacement",
|
||||
'_quality' => "Qualité",
|
||||
|
||||
@@ -31,6 +31,7 @@ $lang = array(
|
||||
'pageNotFound' => "Такое %s не существует.",
|
||||
'gender' => "Пол",
|
||||
'sex' => [null, 'Мужчина', 'Женщина'],
|
||||
'players' => "Игрокам",
|
||||
'quickFacts' => "Краткая информация",
|
||||
'screenshots' => "Изображения",
|
||||
'videos' => "Видео",
|
||||
@@ -57,6 +58,7 @@ $lang = array(
|
||||
'refineSearch' => "Совет: Уточните поиск, добавив <a href=\"javascript:;\" id=\"fi_subcat\">подкатегорию</a>.",
|
||||
'clear' => "Очистить",
|
||||
'exactMatch' => "Полное совпадение",
|
||||
'_reqLevel' => "Требуется уровень",
|
||||
|
||||
// infobox
|
||||
'unavailable' => "Недоступно игрокам",
|
||||
@@ -133,12 +135,15 @@ $lang = array(
|
||||
'itemsets' => "Комплекты",
|
||||
'mechanic' => "Механика",
|
||||
'mechAbbr' => "Механика",
|
||||
'meetingStone' => "Камень встреч",
|
||||
'npc' => "НИП",
|
||||
'npcs' => "НИП",
|
||||
'pet' => "Питомец",
|
||||
'pets' => "Питомцы охотников",
|
||||
'profile' => "",
|
||||
'profiles' => "Профили",
|
||||
'quest' => "задание",
|
||||
'quests' => "Задания",
|
||||
'requires' => "Требует %s",
|
||||
'requires2' => "Требуется:",
|
||||
'reqLevel' => "Требуется уровень: %s",
|
||||
@@ -171,7 +176,7 @@ $lang = array(
|
||||
11 => "драконий", 12 => "калимаг", 13 => "гномский", 14 => "язык троллей", 33 => "наречие нежити", 35 => "дренейский", 36 => "наречие зомби", 37 => "машинный гномский", 38 => "машинный гоблинский"
|
||||
),
|
||||
'gl' => array(null, "Большой", "Малый"),
|
||||
'si' => array(-2 => "Орда только", -1 => "Альянс только", null, "Альянс", "Орда", "Обе"),
|
||||
'si' => array(1 => "Альянс", -1 => "Альянс только", 2 => "Орда", -2 => "Орда только", null, 3 => "Обе"),
|
||||
'resistances' => array(null, 'Сопротивление светлой магии', 'Сопротивление огню', 'Сопротивление силам природы', 'Сопротивление магии льда', 'Сопротивление темной магии', 'Сопротивление тайной магии'),
|
||||
'dt' => array(null, 'Магия', 'Проклятие', 'Болезнь', 'Яд', 'Незаметность', 'Невидимость', null, null, 'Исступление'),
|
||||
'sc' => array("Физический урон", "Свет", "Огонь", "природа", "Лед", "Тьма", "Тайная магия"),
|
||||
@@ -218,6 +223,17 @@ $lang = array(
|
||||
'goForum' => "Feedback <a href=\"?forums&board=1\">forum</a>",
|
||||
),
|
||||
'account' => [],
|
||||
'gameObject' => array(
|
||||
'cat' => [0 => "Другое", 9 => "Книги", 3 => "Контейнеры", -5 => "Сундуки", 25 => "[Fishing Pools]", -3 => "Травы", -4 => "Полезные ископаемые", -2 => "Задания", -6 => "Инструменты"],
|
||||
'type' => [ 9 => "Книга", 3 => "Контейнер", -5 => "Сундук", 25 => "", -3 => "Растение", -4 => "Полезное ископаемое", -2 => "Задание", -6 => ""],
|
||||
'unkPosition' => "Местонахождение этого объекта неизвестно.",
|
||||
'key' => "Ключ",
|
||||
'focus' => "[Spell Focus]",
|
||||
'focusDesc' => "[Spells requiring this Focus can be cast near this Object]",
|
||||
'trap' => "Ловушки",
|
||||
'triggeredBy' => "Срабатывает от",
|
||||
'capturePoint' => "Точка захвата"
|
||||
),
|
||||
'npc' => array(
|
||||
'rank' => [0 => "Обычный", 1 => "Элитный", 4 => "Редкий", 2 => "Редкий элитный", 3 =>"Босс"],
|
||||
'classification'=> "Классификация",
|
||||
@@ -230,6 +246,7 @@ $lang = array(
|
||||
'gainsDesc' => "В награду за убийство этого НИПа вы получите",
|
||||
'repWith' => "репутации с",
|
||||
'stopsAt' => 'останавливается на уровне "%s"',
|
||||
'vehicle' => "Автомобиль",
|
||||
'textTypes' => [null, "кричит", "говорит", "шепчет"],
|
||||
'modes' => array(
|
||||
1 => ["Обычный", "Героический"],
|
||||
@@ -288,9 +305,13 @@ $lang = array(
|
||||
)
|
||||
),
|
||||
'quest' => array(
|
||||
'level' => '%s-го уровня',
|
||||
'questLevel' => '%s-го уровня',
|
||||
'daily' => 'Ежедневно',
|
||||
'requirements' => 'Требования'
|
||||
'requirements' => 'Требования',
|
||||
'questInfo' => array(
|
||||
0 => 'Обычный', 1 => 'Группа', 21 => 'Жизнь', 41 => 'PvP', 62 => 'Рейд', 81 => 'Подземелье', 82 => 'Игровое событие',
|
||||
83 => 'Легенда', 84 => 'Сопровождение', 85 => 'Героическое', 88 => 'Рейд (10)', 89 => 'Рейд (25)'
|
||||
)
|
||||
),
|
||||
'title' => array(
|
||||
'cat' => array(
|
||||
@@ -317,7 +338,13 @@ $lang = array(
|
||||
'spillover' => "[Reputation Spillover]",
|
||||
'spilloverDesc' => "[Gaining Reputation with this faction also yields a proportional gain with the factions listed below.]",
|
||||
'maxStanding' => "Макс Уровень",
|
||||
'quartermaster' => "Интендант"
|
||||
'quartermaster' => "Интендант",
|
||||
'cat' => array(
|
||||
1118 => ["World of Warcraft", 469 => "Альянс", 169 => "Картель Хитрая Шестеренка", 67 => "Орда", 891 => "Силы Альянса", 892 => "Силы Орды"],
|
||||
980 => ["The Burning Crusade", 936 => "Город Шаттрат"],
|
||||
1097 => ["Wrath of the Lich King", 1052 => "Экспедиция Орды", 1117 => "Низина Шолазар", 1037 => "Авангард Альянса"],
|
||||
0 => "Другое"
|
||||
)
|
||||
),
|
||||
'itemset' => array(
|
||||
'_desc' => "<b>%s</b> — <b>%s</b>. Он состоит из %s предметов.",
|
||||
@@ -534,7 +561,6 @@ $lang = array(
|
||||
'_unavailable' => "Этот предмет не доступен игрокам.",
|
||||
'_rndEnchants' => "Случайные улучшения",
|
||||
'_chance' => "(шанс %s%%)",
|
||||
'_reqLevel' => "Требуется уровень",
|
||||
'reqRating' => "Требуется личный и командный рейтинг на арене не ниже %d",
|
||||
'slot' => "Слот",
|
||||
'_quality' => "Качество",
|
||||
|
||||
@@ -394,7 +394,6 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
$tmp['standard'] = true;
|
||||
// Add a gold coin icon
|
||||
$tmp['extra_text'] = $displayMoney ? Util::formatMoney($qty) : $crtName;
|
||||
var_dump($tmp);
|
||||
break;
|
||||
}
|
||||
// If the right column
|
||||
|
||||
@@ -28,22 +28,24 @@ if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
if (isset($cats[0]) && empty($cats[1]))
|
||||
{
|
||||
if (!$cats[0])
|
||||
$conditions[] = ['f1.parentFactionId', [1118, 980, 1097, 469, 891, 67, 892, 169, 1037, 1052, 1117, 936], '!'];
|
||||
$conditions[] = ['parentFactionId', [1118, 980, 1097, 469, 891, 67, 892, 169, 1037, 1052, 1117, 936], '!'];
|
||||
else
|
||||
{
|
||||
$subs = DB::Aowow()->selectCol('SELECT id FROM ?_factions WHERE parentFactionId = ?d', $cats[0]);
|
||||
$conditions[] = ['OR', ['f1.parentFactionId', $subs], ['f1.id', $subs]];
|
||||
$conditions[] = ['OR', ['parentFactionId', $subs], ['id', $subs]];
|
||||
}
|
||||
|
||||
$path[] = $cats[0];
|
||||
// array_unshift($title, Lang::$factions['cat'][$cats[0]]);
|
||||
|
||||
$t = Lang::$faction['cat'][$cats[0]];
|
||||
array_unshift($title, is_array($t) ? $t[0] : $t);
|
||||
}
|
||||
else if (!empty($cats[1]))
|
||||
{
|
||||
$conditions[] = ['f1.parentFactionId', $cats[1]];
|
||||
$conditions[] = ['parentFactionId', $cats[1]];
|
||||
$path[] = $cats[0];
|
||||
$path[] = $cats[1];
|
||||
// array_unshift($title, Lang::$factions['cat'][$cats[1]]);
|
||||
array_unshift($title, Lang::$faction['cat'][$cats[0]][$cats[1]]);
|
||||
}
|
||||
|
||||
$factions = new FactionList($conditions);
|
||||
|
||||
@@ -9,8 +9,9 @@ if (isset($_GET['xml']))
|
||||
|
||||
require 'includes/community.class.php';
|
||||
|
||||
$_id = intVal($pageParam);
|
||||
$_path = [0, 0];
|
||||
$_id = intVal($pageParam);
|
||||
$_path = [0, 0];
|
||||
$_visSlots = [SLOT_HEAD, SLOT_SHOULDERS, SLOT_SHIRT, SLOT_CHEST, SLOT_WAIST, SLOT_LEGS, SLOT_FEET, SLOT_WRISTS, SLOT_HANDS, SLOT_BACK, SLOT_MAIN_HAND, SLOT_OFF_HAND, SLOT_RANGED, SLOT_TABARD];
|
||||
|
||||
$cacheKeyPage = implode('_', [CACHETYPE_PAGE, TYPE_ITEM, $_id, -1, User::$localeId]);
|
||||
|
||||
@@ -246,7 +247,7 @@ if (!$smarty->loadCache($cacheKeyPage, $item))
|
||||
/****************/
|
||||
|
||||
$cmpUpg = in_array($_class, [ITEM_CLASS_WEAPON, ITEM_CLASS_ARMOR]) || $item->getField('gemEnchantmentId');
|
||||
$view3D = in_array($_class, [ITEM_CLASS_WEAPON, ITEM_CLASS_ARMOR]) && $item->getField('displayId');
|
||||
$view3D = in_array($_slot, $_visSlots) && $item->getField('displayId');
|
||||
|
||||
// path
|
||||
if (in_array($_class, [5, 8, 14]))
|
||||
@@ -562,13 +563,7 @@ if (!$smarty->loadCache($cacheKeyPage, $item))
|
||||
if ($lockIds)
|
||||
{
|
||||
// objects
|
||||
$conditions = array(
|
||||
'OR',
|
||||
['AND', ['data0', $lockIds], ['type', [OBJECT_QUESTGIVER, OBJECT_CHEST, OBJECT_TRAP, OBJECT_GOOBER, OBJECT_CAMERA, OBJECT_FLAGSTAND, OBJECT_FLAGDROP]]],
|
||||
['AND', ['data1', $lockIds], ['type', [OBJECT_DOOR, OBJECT_BUTTON]]]
|
||||
);
|
||||
|
||||
$lockedObj = new GameObjectList($conditions);
|
||||
$lockedObj = new GameObjectList(array(['lockId', $lockIds]));
|
||||
if (!$lockedObj->error)
|
||||
{
|
||||
$pageData['relTabs'][] = array(
|
||||
@@ -700,6 +695,7 @@ if (!$smarty->loadCache($cacheKeyPage, $item))
|
||||
}
|
||||
|
||||
// tab: same model as
|
||||
// todo (low): should also work for creatures summoned by item
|
||||
if (($model = $item->getField('model')) && $_slot)
|
||||
{
|
||||
$sameModel = new ItemList(array(['model', $model], ['id', $_id, '!'], ['slot', $_slot]));
|
||||
|
||||
@@ -10,35 +10,18 @@ $_path = [1, 8];
|
||||
$subMenu = $h1Links = null;
|
||||
$_title = '';
|
||||
$_rss = isset($_GET['rss']);
|
||||
$lv = [];
|
||||
|
||||
switch ($pageCall)
|
||||
{
|
||||
case 'random':
|
||||
$type = array_rand(array_filter(Util::$typeStrings));
|
||||
$page = Util::$typeStrings[$type];
|
||||
$id = 0;
|
||||
$typeId = 0;
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
case TYPE_NPC: $id = (new CreatureList(null))->getRandomId(); break;
|
||||
case TYPE_OBJECT: $id = (new GameobjectList(null))->getRandomId(); break;
|
||||
case TYPE_ITEM: $id = (new ItemList(null))->getRandomId(); break;
|
||||
case TYPE_ITEMSET: $id = (new ItemsetList(null))->getRandomId(); break;
|
||||
case TYPE_QUEST: $id = (new QuestList(null))->getRandomId(); break;
|
||||
case TYPE_SPELL: $id = (new SpellList(null))->getRandomId(); break;
|
||||
case TYPE_ZONE: $id = (new ZoneList(null))->getRandomId(); break;
|
||||
case TYPE_FACTION: $id = (new FactionList(null))->getRandomId(); break;
|
||||
case TYPE_PET: $id = (new PetList(null))->getRandomId(); break;
|
||||
case TYPE_ACHIEVEMENT: $id = (new AchievementList(null))->getRandomId(); break;
|
||||
case TYPE_TITLE: $id = (new TitleList(null))->getRandomId(); break;
|
||||
case TYPE_WORLDEVENT: $id = (new WorldEventList(null))->getRandomId(); break;
|
||||
case TYPE_CLASS: $id = (new CharClassList(null))->getRandomId(); break;
|
||||
case TYPE_RACE: $id = (new CharRaceList(null))->getRandomId(); break;
|
||||
case TYPE_SKILL: $id = (new SkillList(null))->getRandomId(); break;
|
||||
case TYPE_CURRENCY: $id = (new CurrencyList(null))->getRandomId(); break;
|
||||
}
|
||||
if ($type != TYPE_QUEST)
|
||||
$typeId = (new Util::$typeClasses[$type](null))->getRandomId();
|
||||
|
||||
header('Location: ?'.$page.'='.$id);
|
||||
header('Location: ?'.Util::$typeStrings[$type].'='.$typeId);
|
||||
die();
|
||||
case 'latest-comments':
|
||||
$menu = 2;
|
||||
@@ -52,22 +35,18 @@ switch ($pageCall)
|
||||
break;
|
||||
case 'latest-screenshots':
|
||||
$menu = 3;
|
||||
$lv = array(
|
||||
array(
|
||||
'file' => 'screenshot',
|
||||
'data' => [],
|
||||
'params' => []
|
||||
)
|
||||
$lv[] = array(
|
||||
'file' => 'screenshot',
|
||||
'data' => [],
|
||||
'params' => []
|
||||
);
|
||||
break;
|
||||
case 'latest-videos':
|
||||
$menu = 11;
|
||||
$lv = array(
|
||||
array(
|
||||
'file' => 'video',
|
||||
'data' => [],
|
||||
'params' => []
|
||||
)
|
||||
$lv[] = array(
|
||||
'file' => 'video',
|
||||
'data' => [],
|
||||
'params' => []
|
||||
);
|
||||
break;
|
||||
case 'latest-articles':
|
||||
@@ -76,15 +55,42 @@ switch ($pageCall)
|
||||
break;
|
||||
case 'latest-additions':
|
||||
$menu = 0;
|
||||
$lv = [];
|
||||
$extraText = '';
|
||||
break;
|
||||
case 'unrated-comments':
|
||||
$menu = 5;
|
||||
$lv = [];
|
||||
$lv[] = array(
|
||||
'file' => 'commentpreview',
|
||||
'data' => [],
|
||||
'params' => []
|
||||
);
|
||||
break;
|
||||
case 'missing-screenshots':
|
||||
$menu = 13;
|
||||
$lv = [];
|
||||
$cnd = [[['cuFlags', CUSTOM_HAS_SCREENSHOT, '&'], 0]];
|
||||
|
||||
if (!User::isInGroup(U_GROUP_STAFF))
|
||||
$cnd[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
|
||||
|
||||
foreach (Util::$typeClasses as $classStr)
|
||||
{
|
||||
// temp: as long as we use world.quest_template
|
||||
if ($classStr == 'QuestList')
|
||||
continue;
|
||||
|
||||
$typeObj = new $classStr($cnd);
|
||||
|
||||
if (!$typeObj->error)
|
||||
{
|
||||
$typeObj->addGlobalsToJscript(Util::$pageTemplate, GLOBALINFO_SELF | GLOBALINFO_RELATED);
|
||||
|
||||
$lv[] = array(
|
||||
'file' => (new ReflectionProperty($typeObj, 'brickFile'))->getValue(),
|
||||
'data' => $typeObj->getListviewData(),
|
||||
'params' => ['tabs' => '$myTabs']
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'most-comments':
|
||||
if ($pageParam && !in_array($pageParam, [1, 7, 30]))
|
||||
@@ -102,7 +108,11 @@ switch ($pageCall)
|
||||
}
|
||||
|
||||
$menu = 12;
|
||||
$lv = [];
|
||||
$lv[] = array(
|
||||
'file' => 'commentpreview',
|
||||
'data' => [],
|
||||
'params' => []
|
||||
);
|
||||
break;
|
||||
default:
|
||||
$smarty->error();
|
||||
@@ -136,14 +146,6 @@ if (strstr($pageCall, 'latest') || $pageCall == 'most-comments')
|
||||
$h1Links = '<small><a href="?'.$pageCall.($pageParam ? '='.$pageParam : null).'&rss" class="rss-icon">'.Lang::$main['subscribe'].'</a></small>';
|
||||
}
|
||||
|
||||
$pageData = array(
|
||||
'listviews' => $lv,
|
||||
'page' => array(
|
||||
'name' => Lang::$main['utilities'][$menu] . ($_title ? Lang::$colon . $_title : null),
|
||||
'h1Links' => $h1Links,
|
||||
)
|
||||
);
|
||||
|
||||
array_push($_path, $menu);
|
||||
if ($subMenu)
|
||||
array_push($_path, $subMenu);
|
||||
@@ -152,14 +154,16 @@ if ($subMenu)
|
||||
// menuId 8: Utilities g_initPath()
|
||||
// tabId 1: Tools g_initHeader()
|
||||
$smarty->updatePageVars(array(
|
||||
'title' => Lang::$main['utilities'][$menu] . ($_title ? ' - ' . $_title : null),
|
||||
'path' => json_encode($_path, JSON_NUMERIC_CHECK),
|
||||
'tab' => 1
|
||||
'name' => Lang::$main['utilities'][$menu] . ($_title ? Lang::$colon . $_title : null),
|
||||
'h1Links' => $h1Links,
|
||||
'title' => Lang::$main['utilities'][$menu] . ($_title ? ' - ' . $_title : null),
|
||||
'path' => json_encode($_path, JSON_NUMERIC_CHECK),
|
||||
'tab' => 1
|
||||
));
|
||||
$smarty->assign('lang', Lang::$main);
|
||||
$smarty->assign('lvData', $pageData);
|
||||
$smarty->assign('lvData', $lv);
|
||||
|
||||
// load the page
|
||||
$smarty->display('generic-no-filter.tpl');
|
||||
$smarty->display('list-page-generic.tpl');
|
||||
|
||||
?>
|
||||
|
||||
217
pages/npc.php
217
pages/npc.php
@@ -82,7 +82,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
if (count($maps) == 1) // should only exist in one instance
|
||||
{
|
||||
$map = new ZoneList(array(1, ['mapId', $maps[0]]));
|
||||
// $mapType = $map->getField('areaType');
|
||||
// $mapType = $map->getField('areaType'); //NYI
|
||||
}
|
||||
|
||||
/***********/
|
||||
@@ -128,13 +128,17 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
if ($_ = intVal(($npc->getField('minGold') + $npc->getField('maxGold')) / 2))
|
||||
$infobox[] = Lang::$npc['worth'].Lang::$colon.'[tooltip=tooltip_avgmoneydropped][money='.$_.'][/tooltip]';
|
||||
|
||||
// is Vehicle
|
||||
if ($npc->getField('vehicleId'))
|
||||
$infobox[] = Lang::$npc['vehicle'];
|
||||
|
||||
// AI
|
||||
if (User::isInGroup(U_GROUP_STAFF))
|
||||
{
|
||||
if ($_ = $npc->getField('aiName'))
|
||||
$infobox[] = 'AI'.Lang::$colon.$_;
|
||||
else if ($_ = $npc->getField('scriptName'))
|
||||
if ($_ = $npc->getField('scriptName'))
|
||||
$infobox[] = 'Script'.Lang::$colon.$_;
|
||||
else if ($_ = $npc->getField('aiName'))
|
||||
$infobox[] = 'AI'.Lang::$colon.$_;
|
||||
}
|
||||
|
||||
$_nf = function ($num) { return number_format($num, 0, '', '.'); };
|
||||
@@ -298,7 +302,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
{
|
||||
// fixup .. either set %s for emotes or dont >.<
|
||||
$text = Util::localizedString($t, 'text');
|
||||
if (in_array($t['type'], [2, 3, 16, 41]) && strpos($text, '%s') === false)
|
||||
if (in_array($t['type'], [2, 16]) && strpos($text, '%s') === false)
|
||||
$text = '%s '.$text;
|
||||
|
||||
$line = array(
|
||||
@@ -367,11 +371,150 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
// tab: SAI
|
||||
// hmm, how should this loot like
|
||||
|
||||
// tab: abilities
|
||||
// for spell in template and smartScripts if set
|
||||
// tab: abilities / tab_controlledabilities (dep: VehicleId)
|
||||
// SMART_SCRIPT_TYPE_CREATURE = 0; SMART_ACTION_CAST = 11; SMART_ACTION_ADD_AURA = 75; SMART_ACTION_INVOKER_CAST = 85; SMART_ACTION_CROSS_CAST = 86
|
||||
$smartSpells = DB::Aowow()->selectCol('SELECT action_param1 FROM smart_scripts WHERE source_type = 0 AND action_type IN (11, 75, 85, 86) AND entryOrGUID = ?d', $_id);
|
||||
$tplSpells = [];
|
||||
$conditions = [['id', $smartSpells]];
|
||||
|
||||
for ($i = 1; $i < 9; $i++)
|
||||
if ($_ = $npc->getField('spell'.$i))
|
||||
$tplSpells[] = $_;
|
||||
|
||||
if ($tplSpells)
|
||||
{
|
||||
$conditions[] = ['id', $tplSpells];
|
||||
$conditions[] = 'OR';
|
||||
}
|
||||
|
||||
if ($tplSpells || $smartSpells)
|
||||
{
|
||||
$abilities = new SpellList($conditions);
|
||||
if (!$abilities->error)
|
||||
{
|
||||
$abilities->addGlobalsToJScript(Util::$pageTemplate, GLOBALINFO_SELF | GLOBALINFO_RELATED);
|
||||
$normal = $abilities->getListviewData();
|
||||
$controled = [];
|
||||
|
||||
if ($npc->getField('vehicleId')) // not quite right. All seats should be checked for allowed-to-cast-flag-something
|
||||
{
|
||||
foreach ($normal as $id => $values)
|
||||
{
|
||||
if (in_array($id, $smartSpells))
|
||||
continue;
|
||||
|
||||
$controled[$id] = $values;
|
||||
unset($normal[$id]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($normal)
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'spell',
|
||||
'data' => $normal,
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'name' => '$LANG.tab_abilities',
|
||||
'id' => 'abilities'
|
||||
]
|
||||
);
|
||||
|
||||
if ($controled)
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'spell',
|
||||
'data' => $controled,
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'name' => '$LANG.tab_controlledabilities',
|
||||
'id' => 'controlled-abilities'
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// tab: summoned by
|
||||
$conditions = array(
|
||||
'OR',
|
||||
['AND', ['effect1Id', 28], ['effect1MiscValue', $_id]],
|
||||
['AND', ['effect2Id', 28], ['effect2MiscValue', $_id]],
|
||||
['AND', ['effect3Id', 28], ['effect3MiscValue', $_id]]
|
||||
);
|
||||
|
||||
$summoned = new SpellList($conditions);
|
||||
if (!$summoned->error)
|
||||
{
|
||||
$summoned->addGlobalsToJscript(Util::$pageTemplate);
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'spell',
|
||||
'data' => $summoned->getListviewData(),
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'name' => '$LANG.tab_summonedby',
|
||||
'id' => 'summoned-by'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// tab: teaches
|
||||
// pet spells, class spells, trade spells
|
||||
if ($npc->getField('npcflag') & NPC_FLAG_TRAINER)
|
||||
{
|
||||
$teachQuery = 'SELECT IFNULL(t2.spell, t1.spell) AS ARRAY_KEY, IFNULL(t2.spellcost, t1.spellcost) AS cost, IFNULL(t2.reqskill, t1.reqskill) AS reqSkillId,
|
||||
IFNULL(t2.reqskillvalue, t1.reqskillvalue) AS reqSkillValue, IFNULL(t2.reqlevel, t1.reqlevel) AS reqLevel
|
||||
FROM npc_trainer t1 LEFT JOIN npc_trainer t2 ON t2.entry = IF(t1.spell < 0, -t1.spell, null) WHERE t1.entry = ?d';
|
||||
|
||||
if ($tSpells = DB::Aowow()->select($teachQuery, $_id))
|
||||
{
|
||||
$teaches = new SpellList(array(['id', array_keys($tSpells)]));
|
||||
if (!$teaches->error)
|
||||
{
|
||||
$teaches->addGlobalsToJscript(Util::$pageTemplate, GLOBALINFO_SELF | GLOBALINFO_RELATED);
|
||||
$data = $teaches->getListviewData();
|
||||
|
||||
$extra = [];
|
||||
foreach ($tSpells as $sId => $train)
|
||||
{
|
||||
if (empty($data[$sId]))
|
||||
continue;
|
||||
|
||||
if ($_ = $train['reqSkillId'])
|
||||
{
|
||||
Util::$pageTemplate->extendGlobalIds(TYPE_SKILL, $_);
|
||||
if (!isset($extra[0]))
|
||||
$extra[0] = 'Listview.extraCols.condition';
|
||||
|
||||
$data[$sId]['condition'] = ['type' => TYPE_SKILL, 'typeId' => $_, 'status' => 1, 'reqSkillLvl' => $train['reqSkillValue']];
|
||||
}
|
||||
|
||||
if ($_ = $train['reqLevel'])
|
||||
{
|
||||
if (!isset($extra[1]))
|
||||
$extra[1] = "Listview.funcBox.createSimpleCol('reqLevel', LANG.tooltip_reqlevel, '7%', 'reqLevel')";
|
||||
|
||||
$data[$sId]['reqLevel'] = $_;
|
||||
}
|
||||
|
||||
if ($_ = $train['cost'])
|
||||
$data[$sId]['trainingcost'] = $_;
|
||||
}
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'spell',
|
||||
'data' => $data,
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'name' => '$LANG.tab_teaches',
|
||||
'id' => 'teaches',
|
||||
'visibleCols' => "$['trainingcost']",
|
||||
'extraCols' => $extra ? '$['.implode(', ', $extra).']' : null
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
Util::$pageTemplate->internalNotice(U_GROUP_EMPLOYEE, 'NPC '.$_id.' is flagged as trainer, but doesn\'t have any spells set');
|
||||
}
|
||||
|
||||
// tab: sells
|
||||
if ($sells = DB::Aowow()->selectCol('SELECT item FROM npc_vendor nv WHERE entry = ?d UNION SELECT item FROM game_event_npc_vendor genv JOIN creature c ON genv.guid = c.guid WHERE c.id = ?d', $_id, $_id))
|
||||
@@ -495,44 +638,38 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
}
|
||||
}
|
||||
|
||||
// tab: starts quest (questrelation)
|
||||
if ($starts = DB::Aowow()->selectCol('SELECT quest FROM creature_questrelation WHERE id = ?d', $_id))
|
||||
// tab: starts quest
|
||||
$starts = new QuestList(array(['npcStart.id', $_id]));
|
||||
if (!$starts->error)
|
||||
{
|
||||
$started = new QuestList(array(['id', $starts]));
|
||||
if (!$started->error)
|
||||
{
|
||||
$started->addGlobalsToJScript(Util::$pageTemplate);
|
||||
$starts->addGlobalsToJScript(Util::$pageTemplate);
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'quest',
|
||||
'data' => $started->getListviewData(),
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'name' => '$LANG.tab_starts',
|
||||
'id' => 'starts'
|
||||
]
|
||||
);
|
||||
}
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'quest',
|
||||
'data' => $starts->getListviewData(),
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'name' => '$LANG.tab_starts',
|
||||
'id' => 'starts'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
// tab: ends quest (involvedrelation)
|
||||
if ($ends = DB::Aowow()->selectCol('SELECT quest FROM creature_involvedrelation WHERE id = ?d', $_id))
|
||||
// tab: ends quest
|
||||
$ends = new QuestList(array(['npcEnd.id', $_id]));
|
||||
if (!$ends->error)
|
||||
{
|
||||
$ended = new QuestList(array(['id', $ends]));
|
||||
if (!$ended->error)
|
||||
{
|
||||
$ended->addGlobalsToJScript(Util::$pageTemplate);
|
||||
$ends->addGlobalsToJScript(Util::$pageTemplate);
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'quest',
|
||||
'data' => $ended->getListviewData(),
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'name' => '$LANG.tab_ends',
|
||||
'id' => 'ends'
|
||||
]
|
||||
);
|
||||
}
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'quest',
|
||||
'data' => $ends->getListviewData(),
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'name' => '$LANG.tab_ends',
|
||||
'id' => 'ends'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
// tab: objective of quest
|
||||
|
||||
450
pages/object.php
450
pages/object.php
@@ -6,7 +6,8 @@ if (!defined('AOWOW_REVISION'))
|
||||
|
||||
require 'includes/community.class.php';
|
||||
|
||||
$_id = intVal($pageParam);
|
||||
$_id = intVal($pageParam);
|
||||
$_path = [0, 5];
|
||||
|
||||
$cacheKeyPage = implode('_', [CACHETYPE_PAGE, TYPE_OBJECT, $_id, -1, User::$localeId]);
|
||||
$cacheKeyTooltip = implode('_', [CACHETYPE_TOOLTIP, TYPE_OBJECT, $_id, -1, User::$localeId]);
|
||||
@@ -20,7 +21,7 @@ if (isset($_GET['power']))
|
||||
|
||||
if (!$smarty->loadCache($cacheKeyTooltip, $x))
|
||||
{
|
||||
$object = new GameObjectList(array(['entry', $_id]));
|
||||
$object = new GameObjectList(array(['id', $_id]));
|
||||
if ($object->error)
|
||||
die('$WowheadPower.registerObject('.$_id.', '.User::$localeId.', {});');
|
||||
|
||||
@@ -41,34 +42,169 @@ if (isset($_GET['power']))
|
||||
// regular page
|
||||
if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
{
|
||||
$object = new GameObjectList(array(['entry', $_id]));
|
||||
$object = new GameObjectList(array(['id', $_id]));
|
||||
if ($object->error)
|
||||
$smarty->notFound(Lang::$game['gameObject'], $_id);
|
||||
|
||||
$_path[] = $object->getField('typeCat');
|
||||
|
||||
|
||||
/* NOTE
|
||||
|
||||
much like items GOs should have difficulty versions of itself, that are spawned for bosses, but this data is mostly contained in scripts
|
||||
also certain chests/caches/ect should be linked to their boss mob
|
||||
|
||||
all of this has to be done manually
|
||||
*/
|
||||
|
||||
/***********/
|
||||
/* Infobox */
|
||||
/***********/
|
||||
|
||||
$infobox = [];
|
||||
|
||||
// Reaction
|
||||
$_ = function ($r)
|
||||
{
|
||||
if ($r == 1) return 2;
|
||||
if ($r == -1) return 10;
|
||||
return;
|
||||
};
|
||||
$infobox[] = Lang::$npc['react'].Lang::$colon.'[color=q'.$_($object->getField('A')).']A[/color] [color=q'.$_($object->getField('H')).']H[/color]';
|
||||
|
||||
// reqSkill
|
||||
switch ($object->getField('typeCat'))
|
||||
{
|
||||
case -3: // Herbalism
|
||||
$infobox[] = sprintf(Lang::$game['requires'], Lang::$spell['lockType'][2].' ('.$object->getField('reqSkill').')');
|
||||
break;
|
||||
case -4: // Mining
|
||||
$infobox[] = sprintf(Lang::$game['requires'], Lang::$spell['lockType'][3].' ('.$object->getField('reqSkill').')');
|
||||
break;
|
||||
case -5: // Lockpicking
|
||||
$infobox[] = sprintf(Lang::$game['requires'], Lang::$spell['lockType'][1].' ('.$object->getField('reqSkill').')');
|
||||
break;
|
||||
default: // requires key .. maybe
|
||||
{
|
||||
$locks = Lang::getLocks($object->getField('lockId'));
|
||||
$l = '';
|
||||
foreach ($locks as $idx => $_)
|
||||
{
|
||||
if ($idx < 0)
|
||||
continue;
|
||||
|
||||
Util::$pageTemplate->extendGlobalIds(TYPE_ITEM, $idx);
|
||||
$l = Lang::$gameObject['key'].Lang::$colon.'[item='.$idx.']';
|
||||
}
|
||||
|
||||
// if no propper item is found use a skill
|
||||
if ($locks)
|
||||
$infobox[] = $l ? $l : array_pop($locks);
|
||||
}
|
||||
}
|
||||
|
||||
// linked trap
|
||||
if ($_ = $object->getField('linkedTrap'))
|
||||
{
|
||||
Util::$pageTemplate->extendGlobalIds(TYPE_OBJECT, $_);
|
||||
$infobox[] = Lang::$gameObject['trap'].Lang::$colon.'[object='.$_.']';
|
||||
}
|
||||
|
||||
// trap for
|
||||
$trigger = new GameObjectList(array(['linkedTrap', $_id]));
|
||||
if (!$trigger->error)
|
||||
{
|
||||
$trigger->addGlobalsToJScript(Util::$pageTemplate);
|
||||
$infobox[] = Lang::$gameObject['triggeredBy'].Lang::$colon.'[object='.$trigger->id.']';
|
||||
}
|
||||
|
||||
// SpellFocus
|
||||
if ($_ = $object->getField('spellFocusId'))
|
||||
$infobox[] = '[tooltip name=focus]'.Lang::$gameObject['focusDesc'].'[/tooltip][span class=tip tooltip=focus]'.Lang::$gameObject['focus'].Lang::$colon.Util::localizedString(DB::Aowow()->selectRow('SELECT * FROM ?_spellFocusObject WHERE id = ?d', $_), 'name').'[/span]';
|
||||
|
||||
// lootinfo: [min, max, restock]
|
||||
if (($_ = $object->getField('lootStack')) && $_[0])
|
||||
{
|
||||
$buff = Lang::$item['charges'].Lang::$colon.$_[0];
|
||||
if ($_[0] < $_[1])
|
||||
$buff .= Lang::$game['valueDelim'].$_[1];
|
||||
|
||||
// since Veins don't have charges anymore, the timer is questionable
|
||||
$infobox[] = $_[2] > 1 ? '[tooltip name=restock][Recharges every '.Util::formatTime($_[2] * 1000).'][/tooltip][span class=tip tooltip=restock]'.$buff.'[/span]' : $buff;
|
||||
}
|
||||
|
||||
// meeting stone [minLevel, maxLevel, zone]
|
||||
if ($object->getField('type') == OBJECT_MEETINGSTONE)
|
||||
{
|
||||
if ($_ = $object->getField('mStone'))
|
||||
{
|
||||
Util::$pageTemplate->extendGlobalIds(TYPE_ZONE, $_[2]);
|
||||
$m = Lang::$game['meetingStone'].Lang::$colon.'[zone='.$_[2].']';
|
||||
|
||||
$l = $_[0];
|
||||
if ($_[0] > 1 && $_[1] > $_[0])
|
||||
$l .= Lang::$game['valueDelim'].min($_[1], MAX_LEVEL);
|
||||
|
||||
$infobox[] = $l ? '[tooltip name=meetingstone]'.sprintf(Lang::$game['reqLevel'], $l).'[/tooltip][span class=tip tooltip=meetingstone]'.$m.'[/span]' : $m;
|
||||
}
|
||||
}
|
||||
|
||||
// capture area [minPlayer, maxPlayer, minTime, maxTime, radius]
|
||||
if ($object->getField('type') == OBJECT_CAPTURE_POINT)
|
||||
{
|
||||
if ($_ = $object->getField('capture'))
|
||||
{
|
||||
$buff = Lang::$gameObject['capturePoint'];
|
||||
|
||||
if ($_[2] > 1 || $_[0])
|
||||
$buff .= Lang::$colon.'[ul]';
|
||||
|
||||
if ($_[2] > 1)
|
||||
$buff .= '[li]'.Lang::$game['duration'].Lang::$colon.($_[3] > $_[2] ? Util::FormatTime($_[3] * 1000, true).' - ' : null).Util::FormatTime($_[2] * 1000, true).'[/li]';
|
||||
|
||||
if ($_[1])
|
||||
$buff .= '[li]'.Lang::$main['players'].Lang::$colon.$_[0].($_[1] > $_[0] ? ' - '.$_[1] : null).'[/li]';
|
||||
|
||||
if ($_[4])
|
||||
$buff .= '[li]'.sprintf(Lang::$spell['range'], $_[4]).'[/li]';
|
||||
|
||||
if ($_[2] > 1 || $_[0])
|
||||
$buff .= '[/ul]';
|
||||
}
|
||||
|
||||
$infobox[] = $buff;
|
||||
}
|
||||
|
||||
// AI
|
||||
if (User::isInGroup(U_GROUP_STAFF))
|
||||
{
|
||||
if ($_ = $object->getField('ScriptName'))
|
||||
$infobox[] = 'Script'.Lang::$colon.$_;
|
||||
else if ($_ = $object->getField('AIName'))
|
||||
$infobox[] = 'AI'.Lang::$colon.$_;
|
||||
}
|
||||
|
||||
|
||||
/****************/
|
||||
/* Main Content */
|
||||
/****************/
|
||||
|
||||
// pageText
|
||||
$pageText = [];
|
||||
if ($next = $object->getField('pageTextId'))
|
||||
{
|
||||
while ($next)
|
||||
{
|
||||
$row = DB::Aowow()->selectRow('SELECT *, text as Text_loc0 FROM page_text pt LEFT JOIN locales_page_text lpt ON pt.entry = lpt.entry WHERE pt.entry = ?d', $next);
|
||||
$next = $row['next_page'];
|
||||
$pageText[] = Util::parseHtmlText(Util::localizedString($row, 'Text'));
|
||||
}
|
||||
}
|
||||
|
||||
// positions
|
||||
$positions = [];
|
||||
/*
|
||||
ListView for fishing holes
|
||||
|
||||
id:'fished-in',
|
||||
hiddenCols:['instancetype', 'level', 'territory', 'category'],
|
||||
extraCols:[{if $percent}Listview.extraCols.percent{/if}],
|
||||
sort:['-percent', 'name'],
|
||||
|
||||
*/
|
||||
|
||||
// NYI -> die()
|
||||
$smarty->error();
|
||||
|
||||
|
||||
|
||||
// path(0, 5, $object['type']),
|
||||
|
||||
// $object['starts'] = array();
|
||||
// $object['ends'] = array();
|
||||
// array(ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT, ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT),
|
||||
// $object['criteria_of'] = array();
|
||||
// object contains [..]
|
||||
|
||||
$object['position'] = position($object['entry'], 'gameobject');
|
||||
$positions = position($object['entry'], 'gameobject');
|
||||
// Исправить type, чтобы подсвечивались event-овые объекты
|
||||
if ($object['position'])
|
||||
foreach ($object['position'] as $z => $zone)
|
||||
@@ -79,33 +215,255 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
$object['position'][$z]['points'][$p]['type'] = 4;
|
||||
$object['position'][$z]['points'][$p]['events'] = implode(", ", $names);
|
||||
}
|
||||
*/
|
||||
|
||||
// menuId 5: Object g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
$pageData = array(
|
||||
'page' => array(
|
||||
'title' => $object->getField('name', true).' - '.Util::ucFirst(Lang::$game['gameObject']),
|
||||
'path' => json_encode($_path, JSON_NUMERIC_CHECK),
|
||||
'name' => $object->getField('name', true),
|
||||
'tab' => 0,
|
||||
'type' => TYPE_OBJECT,
|
||||
'typeId' => $_id,
|
||||
'infobox' => $infobox ? '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]' : null,
|
||||
'pageText' => $pageText,
|
||||
'positions' => $positions,
|
||||
'redButtons' => array(
|
||||
BUTTON_WOWHEAD => true,
|
||||
BUTTON_LINKS => true,
|
||||
BUTTON_VIEW3D => ['displayId' => $object->getField('displayId'), 'type' => TYPE_OBJECT, 'typeId' => $_id]
|
||||
),
|
||||
'reqCSS' => array(
|
||||
$pageText ? ['path' => 'template/css/Book.css'] : null,
|
||||
// ['path' => 'template/css/Mapper.css'],
|
||||
// ['path' => 'template/css/Mapper_ie6.css', 'ieCond' => 'lte IE 6']
|
||||
),
|
||||
'reqJS' => array(
|
||||
$pageText ? 'template/js/Book.js' : null,
|
||||
// 'template/js/Mapper.js',
|
||||
'template/js/swfobject.js'
|
||||
)
|
||||
),
|
||||
'relTabs' => []
|
||||
);
|
||||
|
||||
|
||||
/**************/
|
||||
/* Extra Tabs */
|
||||
/**************/
|
||||
|
||||
// tab: summoned by
|
||||
$conditions = array(
|
||||
'OR',
|
||||
['AND', ['effect1Id', [50, 76, 104, 105, 106, 107]], ['effect1MiscValue', $_id]],
|
||||
['AND', ['effect2Id', [50, 76, 104, 105, 106, 107]], ['effect2MiscValue', $_id]],
|
||||
['AND', ['effect3Id', [50, 76, 104, 105, 106, 107]], ['effect3MiscValue', $_id]]
|
||||
);
|
||||
|
||||
$summons = new SpellList($conditions);
|
||||
if (!$summons->error)
|
||||
{
|
||||
$summons->addGlobalsToJScript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED);
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'spell',
|
||||
'data' => $summons->getListviewData(),
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'id' => 'summoned-by',
|
||||
'name' => '$LANG.tab_summonedby'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
// tab: related spells
|
||||
if ($_ = $object->getField('spells'))
|
||||
{
|
||||
$relSpells = new SpellList(array(['id', $_]));
|
||||
if (!$relSpells->error)
|
||||
{
|
||||
$relSpells->addGlobalsToJScript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED);
|
||||
$data = $relSpells->getListviewData();
|
||||
|
||||
foreach ($data as $relId => $d)
|
||||
$data[$relId]['trigger'] = array_search($relId, $_);
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'spell',
|
||||
'data' => $data,
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'id' => 'spells',
|
||||
'name' => '$LANG.tab_spells',
|
||||
'hiddenCols' => "$['skill']",
|
||||
'extraCols' => "$[Listview.funcBox.createSimpleCol('trigger', 'Condition', '10%', 'trigger')]"
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// tab: criteria of
|
||||
$acvs = new AchievementList(array(['ac.type', [ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT, ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT]], ['ac.value1', $_id]));
|
||||
if (!$acvs->error)
|
||||
{
|
||||
$acvs->addGlobalsToJScript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED);
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'achievement',
|
||||
'data' => $acvs->getListviewData(),
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'id' => 'criteria-of',
|
||||
'name' => '$LANG.tab_criteriaof'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
// tab: starts
|
||||
$started = new QuestList(array(['goStart.id', $_id]));
|
||||
if (!$started->error)
|
||||
{
|
||||
$started->addGlobalsToJScript(Util::$pageTemplate);
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'quest',
|
||||
'data' => $started->getListviewData(),
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'name' => '$LANG.tab_starts',
|
||||
'id' => 'starts'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
// tab: ends
|
||||
$ends = new QuestList(array(['goEnd.id', $_id]));
|
||||
if (!$ends->error)
|
||||
{
|
||||
$ends->addGlobalsToJScript(Util::$pageTemplate);
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'quest',
|
||||
'data' => $ends->getListviewData(),
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'name' => '$LANG.tab_ends',
|
||||
'id' => 'ends'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
// tab: related quests
|
||||
if ($_ = $object->getField('reqQuest'))
|
||||
{
|
||||
$relQuest = new QuestList(array(['id', $_]));
|
||||
if (!$relQuest->error)
|
||||
{
|
||||
$relQuest->addGlobalsToJScript(Util::$pageTemplate);
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'quest',
|
||||
'data' => $relQuest->getListviewData(),
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'name' => '$LANG.tab_quests',
|
||||
'id' => 'quests'
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// tab: contains
|
||||
$reqQuest = [];
|
||||
if ($_ = $object->getField('lootId'))
|
||||
{
|
||||
if ($itemLoot = Util::handleLoot(LOOT_GAMEOBJECT, $_, User::isInGroup(U_GROUP_STAFF), $extraCols))
|
||||
{
|
||||
$hiddenCols = ['source', 'side', 'slot', 'reqlevel'];
|
||||
foreach ($itemLoot as $l => $lv)
|
||||
{
|
||||
if (!empty($hiddenCols))
|
||||
foreach ($hiddenCols as $k => $str)
|
||||
if (!empty($lv[$str]))
|
||||
unset($hiddenCols[$k]);
|
||||
|
||||
if (!$lv['quest'])
|
||||
continue;
|
||||
|
||||
$extraCols[] = 'Listview.extraCols.condition';
|
||||
|
||||
$reqQuest[$lv['id']] = 0;
|
||||
|
||||
$itemLoot[$l]['condition'] = ['type' => TYPE_QUEST, 'typeId' => &$reqQuest[$lv['id']], 'status' => 1];
|
||||
}
|
||||
|
||||
$extraCols[] = 'Listview.extraCols.percent';
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'item',
|
||||
'data' => $itemLoot,
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'name' => '$LANG.tab_contains',
|
||||
'id' => 'contains',
|
||||
'extraCols' => "$[".implode(', ', array_unique($extraCols))."]",
|
||||
'hiddenCols' => $hiddenCols ? '$'.json_encode(array_values($hiddenCols)) : null
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($reqIds = array_keys($reqQuest)) // apply quest-conditions as back-reference
|
||||
{
|
||||
$conditions = array(
|
||||
'OR',
|
||||
['requiredSourceItemId1', $reqIds], ['requiredSourceItemId2', $reqIds],
|
||||
['requiredSourceItemId3', $reqIds], ['requiredSourceItemId4', $reqIds],
|
||||
['requiredItemId1', $reqIds], ['requiredItemId2', $reqIds], ['requiredItemId3', $reqIds],
|
||||
['requiredItemId4', $reqIds], ['requiredItemId5', $reqIds], ['requiredItemId6', $reqIds]
|
||||
);
|
||||
|
||||
$reqQuests = new QuestList($conditions);
|
||||
$reqQuests->addGlobalsToJscript($smarty);
|
||||
|
||||
foreach ($reqQuests->iterate() as $qId => $__)
|
||||
{
|
||||
if (empty($reqQuests->requires[$qId][TYPE_ITEM]))
|
||||
continue;
|
||||
|
||||
foreach ($reqIds as $rId)
|
||||
if (in_array($rId, $reqQuests->requires[$qId][TYPE_ITEM]))
|
||||
$reqQuest[$rId] = $reqQuests->id;
|
||||
}
|
||||
}
|
||||
|
||||
// tab: Same model as .. whats the fucking point..?
|
||||
$sameModel = new GameObjectList(array(['displayId', $object->getField('displayId')], ['id', $_id, '!']));
|
||||
if (!$sameModel->error)
|
||||
{
|
||||
$sameModel->addGlobalsToJScript(Util::$pageTemplate);
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'object',
|
||||
'data' => $sameModel->getListviewData(),
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'name' => '$LANG.tab_samemodelas',
|
||||
'id' => 'same-model-as'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
$smarty->saveCache($cacheKeyPage, $pageData);
|
||||
}
|
||||
|
||||
|
||||
// menuId 5: Object g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
$smarty->updatePageVars(array(
|
||||
'title' => $pageData['title'].' - '.Util::ucFirst(Lang::$game['gameObject']),
|
||||
'path' => $pageData['path'],
|
||||
'tab' => 0,
|
||||
'type' => TYPE_OBJECT,
|
||||
'typeId' => $_id,
|
||||
'reqCSS' => array(
|
||||
$object['pageText'] ? ['path' => 'template/css/Book.css'] : null,
|
||||
['path' => 'template/css/Mapper.css'],
|
||||
['path' => 'template/css/Mapper_ie6.css', 'ieCond' => 'lte IE 6']
|
||||
),
|
||||
'reqJS' => array(
|
||||
$object['pageText'] ? 'template/js/Book.js' : null,
|
||||
'template/js/Mapper.js'
|
||||
)
|
||||
));
|
||||
$smarty->updatePageVars($pageData['page']);
|
||||
$smarty->assign('community', CommunityContent::getAll(TYPE_OBJECT, $_id)); // comments, screenshots, videos
|
||||
$smarty->assign('lang', array_merge(Lang::$main, Lang::$game, Lang::$object, ['colon' => Lang::$colon]));
|
||||
$smarty->assign('lvData', $pageData);
|
||||
$smarty->assign('lang', array_merge(Lang::$main, Lang::$game, Lang::$item, Lang::$gameObject, ['colon' => Lang::$colon]));
|
||||
$smarty->assign('lvData', $pageData['relTabs']);
|
||||
|
||||
// load the page
|
||||
$smarty->display('object.tpl');
|
||||
|
||||
@@ -4,78 +4,77 @@ if (!defined('AOWOW_REVISION'))
|
||||
die('illegal access');
|
||||
|
||||
|
||||
$cat = Util::extractURLParams($pageParam)[0];
|
||||
$path = [0, 5];
|
||||
$validCats = [-2, -3, -4, -5, 3, 9];
|
||||
$title = [Util::ucFirst(Lang::$game['gameObjects'])];
|
||||
$cacheKey = implode('_', [CACHETYPE_PAGE, TYPE_OBJECT, -1, isset($cat) ? $cat : -1, User::$localeId]);
|
||||
$filter = [];
|
||||
$conditions = [];
|
||||
$cat = Util::extractURLParams($pageParam);
|
||||
$path = [0, 5];
|
||||
$validCats = [-2, -3, -4, -5, -6, 0, 3, 9, 25];
|
||||
$title = [Util::ucFirst(Lang::$game['gameObjects'])];
|
||||
$cacheKey = implode('_', [CACHETYPE_PAGE, TYPE_OBJECT, -1, $cat ? $cat[0] : -1, User::$localeId]);
|
||||
|
||||
if (!Util::isValidPage($validCats, $cat))
|
||||
$smarty->error();
|
||||
|
||||
if (isset($cat))
|
||||
if ($cat)
|
||||
{
|
||||
$path[] = $cat; // should be only one parameter anyway
|
||||
// array_unshift($title, Lang::$object['cat'][$cat]);
|
||||
$path[] = $cat[0];
|
||||
array_unshift($title, Lang::$gameObject['cat'][$cat[0]]);
|
||||
$conditions[] = ['typeCat', (int)$cat[0]];
|
||||
}
|
||||
|
||||
if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
if (!$smarty->loadCache($cacheKey, $pageData, $filter))
|
||||
{
|
||||
$objects = new GameObjectList($conditions, true);
|
||||
|
||||
// menuId 5: Object g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
$pageData = array(
|
||||
'listviews' => []
|
||||
'page' => array(
|
||||
'tab' => 0,
|
||||
'title' => implode(" - ", $title),
|
||||
'path' => json_encode($path, JSON_NUMERIC_CHECK),
|
||||
'subCat' => $pageParam ? '='.$pageParam : '',
|
||||
'reqJS' => ['template/js/filters.js']
|
||||
),
|
||||
'lv' => []
|
||||
);
|
||||
|
||||
$conditions = [];
|
||||
|
||||
if ($cat == -3)
|
||||
{
|
||||
$conditions[] = ['type', 3];
|
||||
$conditions[] = ['l.properties1', LOCK_PROPERTY_HERBALISM];
|
||||
}
|
||||
else if ($cat == -4)
|
||||
{
|
||||
$conditions[] = ['type', 3];
|
||||
$conditions[] = ['l.properties1', LOCK_PROPERTY_MINING];
|
||||
}
|
||||
else if ($cat == -5)
|
||||
{
|
||||
$conditions[] = ['type', 3];
|
||||
$conditions[] = ['l.properties2', LOCK_PROPERTY_FOOTLOCKER];
|
||||
}
|
||||
else
|
||||
$conditions[] = ['type', (int)$cat]; // quest not supported
|
||||
|
||||
$objects = new GameObjectList($conditions);
|
||||
// recreate form selection
|
||||
$filter = array_merge($objects->filterGetForm('form'), $filter);
|
||||
$filter['query'] = isset($_GET['filter']) ? $_GET['filter'] : NULL;
|
||||
$filter['fi'] = $objects->filterGetForm();
|
||||
|
||||
$params = [];
|
||||
if ($objects->hasSetFields(['reqSkill']))
|
||||
$params['visibleCols'] = "$['skill']";
|
||||
|
||||
$pageData['listviews'][] = array(
|
||||
$lv = array(
|
||||
'file' => 'object',
|
||||
'data' => $objects->getListviewData(),
|
||||
'params' => $params
|
||||
);
|
||||
|
||||
// create note if search limit was exceeded
|
||||
if ($objects->getMatches() > SQL_LIMIT_DEFAULT)
|
||||
{
|
||||
$lv['params']['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_objectsfound', $objects->getMatches(), SQL_LIMIT_DEFAULT);
|
||||
$lv['params']['_truncated'] = 1;
|
||||
}
|
||||
|
||||
if ($objects->filterGetError())
|
||||
$lv['params']['_errors'] = '$1';
|
||||
|
||||
$objects->addGlobalsToJscript($smarty);
|
||||
$pageData['lv'] = $lv;
|
||||
|
||||
$smarty->saveCache($cacheKey, $pageData);
|
||||
$smarty->saveCache($cacheKey, $pageData, $filter);
|
||||
}
|
||||
|
||||
// menuId 5: Object g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
$smarty->updatePageVars(array(
|
||||
'tab' => 0,
|
||||
'title' => implode(" - ", $title),
|
||||
'path' => "[".implode(", ", $path)."]"
|
||||
));
|
||||
$smarty->assign('lang', Lang::$main);
|
||||
$smarty->assign('lvData', $pageData);
|
||||
$smarty->updatePageVars($pageData['page']);
|
||||
$smarty->assign('filter', $filter);
|
||||
$smarty->assign('lang', array_merge(Lang::$main, ['colon' => Lang::$colon]));
|
||||
$smarty->assign('lvData', $pageData['lv']);
|
||||
|
||||
// load the page
|
||||
// $smarty->display('objects.tpl');
|
||||
$smarty->display('generic-no-filter.tpl');
|
||||
$smarty->display('objects.tpl');
|
||||
|
||||
?>
|
||||
|
||||
@@ -198,7 +198,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
$smarty->updatePageVars($pageData['page']);
|
||||
$smarty->assign('community', CommunityContent::getAll(TYPE_RACE, $_id)); // comments, screenshots, videos
|
||||
$smarty->assign('lang', Lang::$main);
|
||||
$smarty->assign('lvData', $pageData);
|
||||
$smarty->assign('lvData', $pageData['relTabs']);
|
||||
|
||||
// load the page
|
||||
$smarty->display('detail-page-generic.tpl');
|
||||
|
||||
@@ -6,7 +6,8 @@ if (!defined('AOWOW_REVISION'))
|
||||
|
||||
require 'includes/community.class.php';
|
||||
|
||||
$_id = intVal($pageParam);
|
||||
$_id = intVal($pageParam);
|
||||
$_path = [0, 14];
|
||||
|
||||
$cacheKeyPage = implode('_', [CACHETYPE_PAGE, TYPE_SKILL, $_id, -1, User::$localeId]);
|
||||
|
||||
@@ -18,33 +19,38 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
|
||||
$_cat = $skill->getField('typeCat');
|
||||
|
||||
$_path[] = (in_array($_cat, [9, 11]) || $_id == 762) ? $_id : $_cat;
|
||||
|
||||
/****************/
|
||||
/* Main Content */
|
||||
/****************/
|
||||
|
||||
// menuId 14: Skill g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
$pageData = array(
|
||||
'title' => $skill->getField('name', true),
|
||||
'path' => [0, 14],
|
||||
'relTabs' => [],
|
||||
'icons' => [$skill->getField('iconString')],
|
||||
'buttons' => array(
|
||||
BUTTON_WOWHEAD => true,
|
||||
BUTTON_LINKS => true
|
||||
),
|
||||
'page' => array(
|
||||
'name' => $skill->getField('name', true),
|
||||
'id' => $_id
|
||||
'title' => $skill->getField('name', true)." - ".Util::ucfirst(Lang::$game['skill']),
|
||||
'name' => $skill->getField('name', true),
|
||||
'path' => json_encode($_path, JSON_NUMERIC_CHECK),
|
||||
'tab' => 0,
|
||||
'type' => TYPE_SKILL,
|
||||
'typeId' => $_id,
|
||||
'headIcons' => [$skill->getField('iconString')],
|
||||
'redButtons' => array(
|
||||
BUTTON_WOWHEAD => true,
|
||||
BUTTON_LINKS => true
|
||||
)
|
||||
),
|
||||
'relTabs' => []
|
||||
);
|
||||
|
||||
$pageData['path'][] = (in_array($_cat, [9, 11]) || $_id == 762) ? $_id : $_cat;
|
||||
|
||||
/**************/
|
||||
/* Extra Tabs */
|
||||
/**************/
|
||||
|
||||
if (in_array($_cat, [-5, 9, 11]))
|
||||
{
|
||||
// tab: recipes [spells] (crafted)
|
||||
$condition = array(
|
||||
['OR', ['s.reagent1', 0, '>'], ['s.reagent2', 0, '>'], ['s.reagent3', 0, '>'], ['s.reagent4', 0, '>'], ['s.reagent5', 0, '>'], ['s.reagent6', 0, '>'], ['s.reagent7', 0, '>'], ['s.reagent8', 0, '>']],
|
||||
['OR', ['s.skillLine1', $_id], ['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $_id]]],
|
||||
@@ -54,7 +60,6 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
$recipes = new SpellList($condition); // also relevant for 3
|
||||
if (!$recipes->error)
|
||||
{
|
||||
// 1 recipes [spells] (crafted)
|
||||
$recipes->addGlobalsToJscript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED);
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
@@ -70,8 +75,8 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
);
|
||||
}
|
||||
|
||||
// 2 recipe Items [items] (Books)
|
||||
$skill2Filter = [null, 171, 164, 185, 333, 202, 129, 755, 165, 186, 197, null, null, 356, 182, 773];
|
||||
// tab: recipe Items [items] (Books)
|
||||
$filterRecipe = [null, 165, 197, 202, 164, 185, 171, 129, 333, 356, 755, 773, 186, 182];
|
||||
$conditions = array(
|
||||
['requiredSkill', $_id],
|
||||
['class', ITEM_CLASS_RECIPE],
|
||||
@@ -83,6 +88,9 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
{
|
||||
$recipeItems->addGlobalsToJscript($smarty, GLOBALINFO_SELF);
|
||||
|
||||
if ($_ = array_search($_id, $filterRecipe))
|
||||
$_ = sprintf(Util::$filterResultString, "?items=9.".$_);
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'item',
|
||||
'data' => $recipeItems->getListviewData(),
|
||||
@@ -90,13 +98,14 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
'id' => 'recipe-items',
|
||||
'name' => '$LANG.tab_recipeitems',
|
||||
'tabs' => '$tabsRelated',
|
||||
'note' => !empty(array_flip($skill2Filter)[$_id]) ? sprintf(Util::$filterResultString, "?items=9.".array_flip($skill2Filter)[$_id]) : null
|
||||
'note' => $_
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// 3 crafted items [items]
|
||||
$created = [];
|
||||
// tab: crafted items [items]
|
||||
$filterItem = [null, 171, 164, 185, 333, 202, 129, 755, 165, 186, 197, null, null, 356, 182, 773];
|
||||
$created = [];
|
||||
foreach ($recipes->iterate() as $__)
|
||||
if ($idx = $recipes->canCreateItem())
|
||||
foreach ($idx as $i)
|
||||
@@ -109,6 +118,9 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
{
|
||||
$created->addGlobalsToJscript($smarty, GLOBALINFO_SELF);
|
||||
|
||||
if ($_ = array_search($_id, $filterItem))
|
||||
$_ = sprintf(Util::$filterResultString, "?items&filter=cr=86;crs=".$_.";crv=0");
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'item',
|
||||
'data' => $created->getListviewData(),
|
||||
@@ -116,13 +128,13 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
'id' => 'crafted-items',
|
||||
'name' => '$LANG.tab_crafteditems',
|
||||
'tabs' => '$tabsRelated',
|
||||
// 'note' => sprintf(Util::$filterResultString, "?items&filter=cr=86;crs=6;crv=0") // todo (med): after items; [craftedbyProfession (name)]
|
||||
'note' => $_
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// 4a required by [item]
|
||||
// tab: required by [item]
|
||||
$conditions = array(
|
||||
['requiredSkill', $_id],
|
||||
['class', ITEM_CLASS_RECIPE, '!'],
|
||||
@@ -134,6 +146,9 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
{
|
||||
$reqBy->addGlobalsToJscript($smarty, GLOBALINFO_SELF);
|
||||
|
||||
if ($_ = array_search($_id, $filterItem))
|
||||
$_ = sprintf(Util::$filterResultString, "?items&filter=cr=99:168;crs=".$_.":2;crv=0:0");
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'item',
|
||||
'data' => $reqBy->getListviewData(),
|
||||
@@ -141,12 +156,12 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
'id' => 'required-by',
|
||||
'name' => '$LANG.tab_requiredby',
|
||||
'tabs' => '$tabsRelated',
|
||||
// 'note' => sprintf(Util::$filterResultString, "?items&filter=cr=99:168;crs=6:2;crv=0:0") // todo (med): after items; [requiresProfession (yes), teachesSpell (no)]
|
||||
'note' => $_
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// 4b required by [itemset]
|
||||
// tab: required by [itemset]
|
||||
$conditions = array(
|
||||
['skillId', $_id],
|
||||
0
|
||||
@@ -169,7 +184,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
}
|
||||
}
|
||||
|
||||
// 5 spells [spells] (exclude first tab)
|
||||
// tab: spells [spells] (exclude first tab)
|
||||
$reqClass = 0x0;
|
||||
$reqRace = 0x0;
|
||||
$condition = array(
|
||||
@@ -223,7 +238,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
}
|
||||
}
|
||||
|
||||
// 6 trainers [npcs]
|
||||
// tab: trainers [npcs]
|
||||
if (in_array($_cat, [-5, 6, 7, 8, 9, 11]))
|
||||
{
|
||||
$list = [];
|
||||
@@ -268,7 +283,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
}
|
||||
}
|
||||
|
||||
// 7 quests [quests]
|
||||
// tab: quests [quests]
|
||||
if (in_array($_cat, [9, 11])) // only for professions
|
||||
{
|
||||
$sort = 0;
|
||||
@@ -304,7 +319,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
}
|
||||
}
|
||||
|
||||
// 8 related classes (apply classes from 5)
|
||||
// tab: related classes (apply classes from [itemset])
|
||||
$class = [];
|
||||
for ($i = 0; $i < 11; $i++)
|
||||
if ($reqClass & (1 << $i))
|
||||
@@ -325,7 +340,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
}
|
||||
}
|
||||
|
||||
// 9 related races (apply races from 5)
|
||||
// tab: related races (apply races from [itemset])
|
||||
$race = [];
|
||||
for ($i = 0; $i < 12; $i++)
|
||||
if ($reqRace & (1 << $i))
|
||||
@@ -349,19 +364,10 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
$smarty->saveCache($cacheKeyPage, $pageData);
|
||||
}
|
||||
|
||||
// menuId 14: Skill g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
$smarty->updatePageVars(array(
|
||||
'title' => $pageData['title']." - ".Util::ucfirst(Lang::$game['skill']),
|
||||
'path' => json_encode($pageData['path'], JSON_NUMERIC_CHECK),
|
||||
'tab' => 0,
|
||||
'type' => TYPE_SKILL,
|
||||
'typeId' => $_id
|
||||
));
|
||||
$smarty->assign('redButtons', $pageData['buttons']);
|
||||
$smarty->updatePageVars($pageData['page']);
|
||||
$smarty->assign('community', CommunityContent::getAll(TYPE_SKILL, $_id)); // comments, screenshots, videos
|
||||
$smarty->assign('lang', array_merge(Lang::$main));
|
||||
$smarty->assign('lvData', $pageData);
|
||||
$smarty->assign('lvData', $pageData['relTabs']);
|
||||
|
||||
// load the page
|
||||
$smarty->display('detail-page-generic.tpl');
|
||||
|
||||
@@ -4,11 +4,11 @@ if (!defined('AOWOW_REVISION'))
|
||||
die('illegal access');
|
||||
|
||||
|
||||
$cat = Util::extractURLParams($pageParam)[0];
|
||||
$cat = Util::extractURLParams($pageParam);
|
||||
$path = [0, 14];
|
||||
$title = [Util::ucFirst(Lang::$game['skills'])];
|
||||
$cacheKey = implode('_', [CACHETYPE_PAGE, TYPE_SKILL, -1, $cat ? $cat : -1, User::$localeId]);
|
||||
$validCats = [-6, -5, -4, 6, 8, 9, 10, 11];
|
||||
$cacheKey = implode('_', [CACHETYPE_PAGE, TYPE_SKILL, -1, $cat ? $cat[0] : -1, User::$localeId]);
|
||||
$validCats = [-6, -5, -4, 6, 7, 8, 9, 10, 11];
|
||||
|
||||
if (!Util::isValidPage($validCats, $cat))
|
||||
$smarty->error();
|
||||
@@ -18,17 +18,22 @@ if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
$conditions = [['categoryId', 12, '!']]; // DND
|
||||
if ($cat)
|
||||
{
|
||||
$conditions[] = ['typeCat', $cat];
|
||||
$path[] = $cat;
|
||||
array_unshift($title, Lang::$skill['cat'][$cat]);
|
||||
$conditions[] = ['typeCat', $cat[0]];
|
||||
$path[] = $cat[0];
|
||||
array_unshift($title, Lang::$skill['cat'][$cat[0]]);
|
||||
}
|
||||
|
||||
$skills = new SkillList($conditions);
|
||||
|
||||
// menuId 14: Skill g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
$pageData = array(
|
||||
'title' => $title,
|
||||
'path' => $path,
|
||||
'listviews' => array(
|
||||
'page' => array(
|
||||
'title' => implode(' - ', $title),
|
||||
'path' => json_encode($path, JSON_NUMERIC_CHECK),
|
||||
'tab' => 0
|
||||
),
|
||||
'lv' => array(
|
||||
array(
|
||||
'file' => 'skill',
|
||||
'data' => $skills->getListviewData(),
|
||||
@@ -41,15 +46,9 @@ if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
}
|
||||
|
||||
|
||||
// menuId 14: Skill g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
$smarty->updatePageVars(array(
|
||||
'title' => implode(' - ', $title),
|
||||
'path' => json_encode($path, JSON_NUMERIC_CHECK),
|
||||
'tab' => 0
|
||||
));
|
||||
$smarty->updatePageVars($pageData['page']);
|
||||
$smarty->assign('lang', Lang::$main);
|
||||
$smarty->assign('lvData', $pageData);
|
||||
$smarty->assign('lvData', $pageData['lv']);
|
||||
|
||||
// load the page
|
||||
$smarty->display('list-page-generic.tpl');
|
||||
|
||||
@@ -179,7 +179,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
if ($_ = $spell->getField('spellFocusObject')) // spellFocus
|
||||
{
|
||||
$bar = DB::Aowow()->selectRow('SELECT * FROM ?_spellFocusObject WHERE id = ?d', $_);
|
||||
$focus = new GameObjectList(array(['type', 8], ['data0', $_], 1));
|
||||
$focus = new GameObjectList(array(['spellFocusId', $_], 1));
|
||||
$infobox[] = '[li]'.Lang::$game['requires2'].' '.($focus->error ? Util::localizedString($bar, 'name') : '[url=?object='.$focus->id.']'.Util::localizedString($bar, 'name').'[/url]').'[/li]';
|
||||
}
|
||||
|
||||
@@ -399,25 +399,31 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
array_unshift($reagentResult, null);
|
||||
unset($reagentResult[0]);
|
||||
|
||||
// menuId 1: Spell g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
$pageData = array(
|
||||
'title' => $spell->getField('name', true),
|
||||
'path' => json_encode($_path, JSON_NUMERIC_CHECK),
|
||||
'infobox' => $infobox,
|
||||
'relTabs' => [],
|
||||
'buttons' => array(
|
||||
BUTTON_LINKS => ['color' => 'ff71d5ff', 'linkId' => Util::$typeStrings[TYPE_SPELL].':'.$_id],
|
||||
BUTTON_VIEW3D => false,
|
||||
BUTTON_WOWHEAD => true
|
||||
),
|
||||
'page' => array(
|
||||
'title' => $spell->getField('name', true).' - '.Util::ucFirst(Lang::$game['spell']),
|
||||
'path' => json_encode($_path, JSON_NUMERIC_CHECK),
|
||||
'tab' => 0,
|
||||
'type' => TYPE_SPELL,
|
||||
'typeId' => $_id,
|
||||
'reqJS' => array(
|
||||
$pageData['buttons'][BUTTON_VIEW3D] ? 'template/js/swfobject.js' : null
|
||||
),
|
||||
'redButtons' => array(
|
||||
BUTTON_LINKS => ['color' => 'ff71d5ff', 'linkId' => Util::$typeStrings[TYPE_SPELL].':'.$_id],
|
||||
BUTTON_VIEW3D => false,
|
||||
BUTTON_WOWHEAD => true
|
||||
),
|
||||
'infobox' => $infobox,
|
||||
'scaling' => '',
|
||||
'powerCost' => $spell->createPowerCostForCurrent(),
|
||||
'castTime' => $spell->createCastTimeForCurrent(false, false),
|
||||
'tools' => $spell->getToolsForCurrent(),
|
||||
'reagents' => [$enhanced, $reagentResult],
|
||||
'name' => $spell->getField('name', true),
|
||||
'icon' => $spell->getField('iconString'),
|
||||
'stack' => $spell->getField('stackAmount'),
|
||||
'headIcons' => [$spell->getField('iconString'), $spell->getField('stackAmount')],
|
||||
'level' => $spell->getField('spellLevel'),
|
||||
'rangeName' => $spell->getField('rangeText', true),
|
||||
'range' => $spell->getField('rangeMaxHostile'),
|
||||
@@ -426,7 +432,8 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
'school' => User::isInGroup(U_GROUP_STAFF) ? sprintf(Util::$dfnString, Util::asHex($spell->getField('schoolMask')), Lang::getMagicSchools($spell->getField('schoolMask'))) : Lang::getMagicSchools($spell->getField('schoolMask')),
|
||||
'dispel' => Lang::$game['dt'][$spell->getField('dispelType')],
|
||||
'mechanic' => Lang::$game['me'][$spell->getField('mechanic')],
|
||||
)
|
||||
),
|
||||
'relTabs' => []
|
||||
);
|
||||
|
||||
if ($spell->getField('attributes2') & 0x80000)
|
||||
@@ -706,11 +713,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
$foo['name'] .= Lang::$colon.Util::ucFirst(Lang::$game['quest']).' #'.$effMV;;
|
||||
break;
|
||||
case 28: // Summon
|
||||
case 75: // Summon Totem
|
||||
case 87: // Summon Totem (slot 1)
|
||||
case 88: // Summon Totem (slot 2)
|
||||
case 89: // Summon Totem (slot 3)
|
||||
case 90: // Summon Totem (slot 4)
|
||||
case 90: // Kill Credit
|
||||
$_ = Lang::$game['npc'].' #'.$effMV;
|
||||
$summon = new CreatureList(array(['ct.id', $effMV]));
|
||||
if (!$summon->error)
|
||||
@@ -759,18 +762,17 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
break;
|
||||
case 50: // Trans Door
|
||||
case 76: // Summon Object (Wild)
|
||||
case 86: // Activate Object
|
||||
// case 86: // Activate Object
|
||||
case 104: // Summon Object (slot 1)
|
||||
case 105: // Summon Object (slot 2)
|
||||
case 106: // Summon Object (slot 3)
|
||||
case 107: // Summon Object (slot 4)
|
||||
// todo (low): create go/modelviewer-data
|
||||
$_ = Util::ucFirst(Lang::$game['gameObject']).' #'.$effMV;
|
||||
$n = GameObjectList::getName($effMV); // $summon = new GameObjectList(array(['go.id', $effMV]));
|
||||
if ($n/*!$summon->error*/)
|
||||
$summon = new GameObjectList(array(['o.id', $effMV]));
|
||||
if (!$summon->error)
|
||||
{
|
||||
$_ = '(<a href="?object='.$effMV.'">'.$n/*$summon->getField('name', true)*/.'</a>)';
|
||||
//$pageData['buttons'][BUTTON_VIEW3D] = ['type' => TYPE_NPC, 'displayId' => $summon->getRandomModelId()];
|
||||
$_ = '(<a href="?object='.$effMV.'">'.$summon->getField('name', true).'</a>)';
|
||||
$pageData['buttons'][BUTTON_VIEW3D] = ['type' => TYPE_OBJECT, 'displayId' => $summon->getField('displayId')];
|
||||
}
|
||||
|
||||
$foo['name'] .= Lang::$colon.$_;
|
||||
@@ -894,7 +896,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
);
|
||||
|
||||
if ($st['creatureType'] > 0)
|
||||
$pageData['infobox'][] = '[li]'.Lang::$game['type'].Lang::$colon.Lang::$game['ct'][$st['creatureType']].'[/li]';
|
||||
$pageData['page']['infobox'][] = '[li]'.Lang::$game['type'].Lang::$colon.Lang::$game['ct'][$st['creatureType']].'[/li]';
|
||||
|
||||
if ($_ = Util::localizedString($st, 'name'))
|
||||
$bar = User::isInGroup(U_GROUP_STAFF) ? sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$colon.$effMV, $_) : $_;
|
||||
@@ -1070,7 +1072,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
unset($foo['value']);
|
||||
}
|
||||
|
||||
$pageData['infobox'] = !empty($pageData['infobox']) ? '[ul]'.implode('', $pageData['infobox']).'[/ul]' : null;
|
||||
$pageData['page']['infobox'] = !empty($pageData['page']['infobox']) ? '[ul]'.implode('', $pageData['page']['infobox']).'[/ul]' : null;
|
||||
|
||||
unset($foo); // clear reference
|
||||
|
||||
@@ -1315,6 +1317,30 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
$ubItems->addGlobalsToJScript($smarty, GLOBALINFO_SELF);
|
||||
}
|
||||
|
||||
// tab: used by - object
|
||||
$conditions = array(
|
||||
'OR',
|
||||
['onUseSpell', $spell->id], ['onSuccessSpell', $spell->id],
|
||||
['auraSpell', $spell->id], ['triggeredSpell', $spell->id]
|
||||
);
|
||||
|
||||
$ubObjects = new GameObjectList($conditions);
|
||||
if (!$ubObjects->error)
|
||||
{
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'object',
|
||||
'data' => $ubObjects->getListviewData(),
|
||||
'params' => [
|
||||
'tabs' => '$tabsRelated',
|
||||
'id' => 'used-by-object',
|
||||
'name' => '$LANG.tab_usedby'
|
||||
]
|
||||
);
|
||||
|
||||
$ubObjects->addGlobalsToJScript($smarty);
|
||||
}
|
||||
|
||||
// tab: criteria of
|
||||
$conditions = array(
|
||||
['ac.type', [ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2, ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2, ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL]
|
||||
@@ -1728,22 +1754,10 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
}
|
||||
|
||||
|
||||
// menuId 1: Spell g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
$smarty->updatePageVars(array(
|
||||
'title' => $pageData['title'].' - '.Util::ucFirst(Lang::$game['spell']),
|
||||
'path' => $pageData['path'],
|
||||
'tab' => 0,
|
||||
'type' => TYPE_SPELL,
|
||||
'typeId' => $_id,
|
||||
'reqJS' => array(
|
||||
$pageData['buttons'][BUTTON_VIEW3D] ? 'template/js/swfobject.js' : null
|
||||
)
|
||||
));
|
||||
$smarty->assign('redButtons', $pageData['buttons']);
|
||||
$smarty->updatePageVars($pageData['page']);
|
||||
$smarty->assign('community', CommunityContent::getAll(TYPE_SPELL, $_id)); // comments, screenshots, videos
|
||||
$smarty->assign('lang', array_merge(Lang::$main, Lang::$game, Lang::$spell, ['colon' => Lang::$colon]));
|
||||
$smarty->assign('lvData', $pageData);
|
||||
$smarty->assign('lvData', $pageData['relTabs']);
|
||||
|
||||
// load the page
|
||||
$smarty->display('spell.tpl');
|
||||
|
||||
638
pages/spells.php
638
pages/spells.php
@@ -78,363 +78,375 @@ $shortFilter = array(
|
||||
if (!Util::isValidPage($validCats, $cats))
|
||||
$smarty->error();
|
||||
|
||||
$path = array_merge($path, $cats);
|
||||
|
||||
if (isset($cats))
|
||||
{
|
||||
if (isset($cats[1]))
|
||||
array_pop($title);
|
||||
|
||||
$x = @Lang::$spell['cat'][$cats[0]];
|
||||
if (is_array($x))
|
||||
{
|
||||
if (is_array($x[0]))
|
||||
array_unshift($title, $x[0][0]);
|
||||
else
|
||||
array_unshift($title, $x[0]);
|
||||
}
|
||||
else if ($x !== null)
|
||||
array_unshift($title, $x);
|
||||
}
|
||||
|
||||
if (!$smarty->loadCache($cacheKey, $pageData, $filter))
|
||||
{
|
||||
$conditions = [];
|
||||
$visibleCols = [];
|
||||
$hiddenCols = [];
|
||||
|
||||
$pageData = array(
|
||||
'page' => [],
|
||||
$lv = array(
|
||||
'file' => 'spell',
|
||||
'data' => [],
|
||||
'title' => '',
|
||||
'path' => '',
|
||||
'params' => []
|
||||
);
|
||||
|
||||
switch($cats[0])
|
||||
// reconstruct path & title
|
||||
$path = array_merge($path, $cats);
|
||||
|
||||
if ($cats)
|
||||
{
|
||||
case -2: // Character Talents
|
||||
$filter['classPanel'] = true;
|
||||
if (isset($cats[1]))
|
||||
array_pop($title);
|
||||
|
||||
array_push($visibleCols, 'singleclass', 'level', 'schools', 'tier');
|
||||
$x = @Lang::$spell['cat'][$cats[0]];
|
||||
if (is_array($x))
|
||||
{
|
||||
if (is_array($x[0]))
|
||||
array_unshift($title, $x[0][0]);
|
||||
else
|
||||
array_unshift($title, $x[0]);
|
||||
}
|
||||
else if ($x !== null)
|
||||
array_unshift($title, $x);
|
||||
|
||||
$conditions[] = ['s.typeCat', -2];
|
||||
switch($cats[0])
|
||||
{
|
||||
case -2: // Character Talents
|
||||
$filter['classPanel'] = true;
|
||||
|
||||
if (isset($cats[1]))
|
||||
array_unshift($title, Lang::$game['cl'][$cats[1]]);
|
||||
array_push($visibleCols, 'singleclass', 'level', 'schools', 'tier');
|
||||
|
||||
if (isset($cats[1]) && empty($cats[2])) // i will NOT redefine those class2skillId ... reusing
|
||||
$conditions[] = ['s.skillLine1', $validCats[-2][$cats[1]]];
|
||||
else if (isset($cats[1]))
|
||||
$conditions[] = ['s.skillLine1', $cats[2]];
|
||||
$conditions[] = ['s.typeCat', -2];
|
||||
|
||||
break;
|
||||
case -3: // Pet Spells
|
||||
array_push($visibleCols, 'level', 'schools');
|
||||
if (isset($cats[1]))
|
||||
array_unshift($title, Lang::$game['cl'][$cats[1]]);
|
||||
|
||||
$conditions[] = ['s.typeCat', -3];
|
||||
if (isset($cats[1]) && empty($cats[2])) // i will NOT redefine those class2skillId ... reusing
|
||||
$conditions[] = ['s.skillLine1', $validCats[-2][$cats[1]]];
|
||||
else if (isset($cats[1]))
|
||||
$conditions[] = ['s.skillLine1', $cats[2]];
|
||||
|
||||
if (isset($cats[1]))
|
||||
{
|
||||
$xCond = null;
|
||||
for ($i = -2; $i < 0; $i++)
|
||||
break;
|
||||
case -3: // Pet Spells
|
||||
array_push($visibleCols, 'level', 'schools');
|
||||
|
||||
$conditions[] = ['s.typeCat', -3];
|
||||
|
||||
if (isset($cats[1]))
|
||||
{
|
||||
foreach (Util::$skillLineMask[$i] as $idx => $pair)
|
||||
$xCond = null;
|
||||
for ($i = -2; $i < 0; $i++)
|
||||
{
|
||||
if ($pair[1] == $cats[1])
|
||||
foreach (Util::$skillLineMask[$i] as $idx => $pair)
|
||||
{
|
||||
$xCond = ['AND', ['s.skillLine1', $i], ['s.skillLine2OrMask', 1 << $idx, '&']];
|
||||
break;
|
||||
if ($pair[1] == $cats[1])
|
||||
{
|
||||
$xCond = ['AND', ['s.skillLine1', $i], ['s.skillLine2OrMask', 1 << $idx, '&']];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$conditions[] = [
|
||||
'OR',
|
||||
$xCond,
|
||||
['s.skillLine1', $cats[1]],
|
||||
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $cats[1]]]
|
||||
];
|
||||
|
||||
array_unshift($title, Lang::$spell['cat'][-3][$cats[1]]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$conditions[] = [
|
||||
'OR',
|
||||
['s.skillLine1', [-1, -2]],
|
||||
['s.skillLine1', $validCats[-3]],
|
||||
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $validCats[-3]]]
|
||||
];
|
||||
}
|
||||
|
||||
break;
|
||||
case -4: // Racials
|
||||
array_push($visibleCols, 'classes');
|
||||
|
||||
$conditions[] = ['s.typeCat', -4];
|
||||
|
||||
break;
|
||||
case -8: // NPC-Spells
|
||||
case -9: // GM Spells
|
||||
array_push($visibleCols, 'level');
|
||||
case -5: // Mounts
|
||||
case -6: // Companions
|
||||
$conditions[] = ['s.typeCat', $cats[0]];
|
||||
|
||||
break;
|
||||
case -7: // Pet Talents
|
||||
array_push($visibleCols, 'level', 'tier');
|
||||
|
||||
$conditions[] = ['s.typeCat', -7];
|
||||
|
||||
if (isset($cats[1]))
|
||||
{
|
||||
array_unshift($title, Lang::$spell['cat'][-7][$cats[1]]);
|
||||
|
||||
switch($cats[1]) // Spells can be used by multiple specs
|
||||
{
|
||||
case 409: // Tenacity
|
||||
$conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE1, '&'];
|
||||
$url = '?pets=1';
|
||||
break;
|
||||
case 410: // Cunning
|
||||
$conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE2, '&'];
|
||||
$url = '?pets=2';
|
||||
break;
|
||||
case 411: // Ferocity
|
||||
$conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE0, '&'];
|
||||
$url = '?pets=0';
|
||||
break;
|
||||
}
|
||||
|
||||
$lv['params']['note'] = '$$WH.sprintf(LANG.lvnote_pettalents, "'.$url.'")';
|
||||
}
|
||||
|
||||
$lv['params']['_petTalents'] = 1; // not conviced, this is correct, but .. it works
|
||||
|
||||
break;
|
||||
case -11: // Proficiencies ... the subIds are actually SkillLineCategories
|
||||
if (!isset($cats[1]) || $cats[1] != 10)
|
||||
array_push($visibleCols, 'classes');
|
||||
|
||||
$conditions[] = ['s.typeCat', -11];
|
||||
|
||||
if (isset($cats[1]))
|
||||
{
|
||||
if ($cats[1] == 6) // todo (med): we know Weapon(6) includes spell Shoot(3018), that has a mask; but really, ANY proficiency or petSkill should be in that mask so there is no need to differenciate
|
||||
$conditions[] = ['OR', ['s.skillLine1', SpellList::$skillLines[$cats[1]]], ['s.skillLine1', -3]];
|
||||
else
|
||||
$conditions[] = ['s.skillLine1', SpellList::$skillLines[$cats[1]]];
|
||||
|
||||
array_unshift($title, Lang::$spell['cat'][-11][$cats[1]]);
|
||||
}
|
||||
|
||||
break;
|
||||
case -13: // Glyphs
|
||||
$filter['classPanel'] = true;
|
||||
$filter['glyphPanel'] = true;
|
||||
|
||||
array_push($visibleCols, 'singleclass', 'glyphtype');
|
||||
|
||||
$conditions[] = ['s.typeCat', -13];
|
||||
|
||||
if (isset($cats[1]))
|
||||
{
|
||||
array_unshift($title, Lang::$game['cl'][$cats[1]]);
|
||||
$conditions[] = ['s.reqClassMask', 1 << ($cats[1] - 1), '&'];
|
||||
}
|
||||
|
||||
break;
|
||||
case 7: // Abilities
|
||||
$filter['classPanel'] = true;
|
||||
|
||||
array_push($visibleCols, 'level', 'singleclass', 'schools');
|
||||
|
||||
if (isset($cats[1]))
|
||||
array_unshift($title, Lang::$game['cl'][$cats[1]]);
|
||||
|
||||
$conditions[] = ['s.typeCat', [7, -2]];
|
||||
$conditions[] = [['s.cuFlags', (SPELL_CU_TRIGGERED | SPELL_CU_TALENT | CUSTOM_EXCLUDE_FOR_LISTVIEW), '&'], 0];
|
||||
|
||||
// Runeforging listed multiple times, exclude from explicit skill-listing
|
||||
// if (isset($cats[1]) && $cats[1] == 6 && isset($cats[2]) && $cats[2] != 776)
|
||||
// $conditions[] = [['s.attributes0', 0x80, '&'], 0];
|
||||
// else
|
||||
// $conditions[] = [
|
||||
// [['s.attributes0', 0x80, '&'], 0], // ~SPELL_ATTR0_HIDDEN_CLIENTSIDE
|
||||
// ['s.attributes0', 0x20, '&'], // SPELL_ATTR0_TRADESPELL (DK: Runeforging)
|
||||
// 'OR'
|
||||
// ];
|
||||
|
||||
if (isset($cats[2]))
|
||||
{
|
||||
$conditions[] = [
|
||||
'OR',
|
||||
['s.skillLine1', $cats[2]],
|
||||
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $cats[2]]]
|
||||
];
|
||||
|
||||
}
|
||||
else if (isset($cats[1]))
|
||||
{
|
||||
$conditions[] = [
|
||||
'OR',
|
||||
['s.skillLine1', $validCats[7][$cats[1]]],
|
||||
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $validCats[7][$cats[1]]]]
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
case 9: // Secondary Skills
|
||||
array_push($visibleCols, 'source');
|
||||
|
||||
$conditions[] = ['s.typeCat', 9];
|
||||
|
||||
if (isset($cats[1]))
|
||||
{
|
||||
array_unshift($title, Lang::$spell['cat'][9][$cats[1]]);
|
||||
|
||||
$conditions[] = [
|
||||
'OR',
|
||||
['s.skillLine1', $cats[1]],
|
||||
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $cats[1]]]
|
||||
];
|
||||
|
||||
if ($sf = @$shortFilter[$cats[1]])
|
||||
{
|
||||
$txt = '';
|
||||
if ($sf[0] && $sf[1])
|
||||
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]) . Lang::$spell['relItems']['link'] . sprintf(Lang::$spell['relItems']['recipes'], $sf[1]);
|
||||
else if ($sf[0])
|
||||
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]);
|
||||
else if ($sf[1])
|
||||
$txt = sprintf(Lang::$spell['relItems']['recipes'], $sf[1]);
|
||||
|
||||
$note = Lang::$spell['cat'][$cats[0]][$cats[1]];
|
||||
if (is_array($note))
|
||||
$note = $note[0];
|
||||
|
||||
$lv['params']['note'] = sprintf(Lang::$spell['relItems']['base'], $txt, $note);
|
||||
$lv['params']['sort'] = "$['skill', 'name']";
|
||||
}
|
||||
}
|
||||
|
||||
$conditions[] = [
|
||||
'OR',
|
||||
$xCond,
|
||||
['s.skillLine1', $cats[1]],
|
||||
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $cats[1]]]
|
||||
];
|
||||
break;
|
||||
case 11: // Professions
|
||||
array_push($visibleCols, 'source');
|
||||
|
||||
array_unshift($title, Lang::$spell['cat'][-3][$cats[1]]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$conditions[] = [
|
||||
'OR',
|
||||
['s.skillLine1', [-1, -2]],
|
||||
['s.skillLine1', $validCats[-3]],
|
||||
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $validCats[-3]]]
|
||||
];
|
||||
}
|
||||
$conditions[] = ['s.typeCat', 11];
|
||||
|
||||
break;
|
||||
case -4: // Racials
|
||||
array_push($visibleCols, 'classes');
|
||||
|
||||
$conditions[] = ['s.typeCat', -4];
|
||||
|
||||
break;
|
||||
case -8: // NPC-Spells
|
||||
case -9: // GM Spells
|
||||
array_push($visibleCols, 'level');
|
||||
case -5: // Mounts
|
||||
case -6: // Companions
|
||||
$conditions[] = ['s.typeCat', $cats[0]];
|
||||
|
||||
break;
|
||||
case -7: // Pet Talents
|
||||
array_push($visibleCols, 'level', 'tier');
|
||||
|
||||
$conditions[] = ['s.typeCat', -7];
|
||||
|
||||
if (isset($cats[1]))
|
||||
{
|
||||
array_unshift($title, Lang::$spell['cat'][-7][$cats[1]]);
|
||||
|
||||
switch($cats[1]) // Spells can be used by multiple specs
|
||||
if (isset($cats[2]))
|
||||
{
|
||||
case 409: // Tenacity
|
||||
$conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE1, '&'];
|
||||
$url = '?pets=1';
|
||||
break;
|
||||
case 410: // Cunning
|
||||
$conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE2, '&'];
|
||||
$url = '?pets=2';
|
||||
break;
|
||||
case 411: // Ferocity
|
||||
$conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE0, '&'];
|
||||
$url = '?pets=0';
|
||||
break;
|
||||
array_unshift($title, Lang::$spell['cat'][11][$cats[1]][$cats[2]]);
|
||||
|
||||
if ($cats[2] == 9787) // general weaponsmithing
|
||||
$conditions[] = ['s.reqSpellId', [9787, 17039, 17040, 17041]];
|
||||
else
|
||||
$conditions[] = ['s.reqSpellId', $cats[2]];
|
||||
}
|
||||
else if (isset($cats[1]))
|
||||
{
|
||||
$x = Lang::$spell['cat'][11][$cats[1]];
|
||||
if (is_array($x))
|
||||
array_unshift($title, $x[0]);
|
||||
else
|
||||
array_unshift($title, $x);
|
||||
$conditions[] = ['s.skillLine1', $cats[1]];
|
||||
}
|
||||
|
||||
$pageData['params']['note'] = '$$WH.sprintf(LANG.lvnote_pettalents, "'.$url.'")';
|
||||
}
|
||||
|
||||
$pageData['params']['_petTalents'] = 1; // not conviced, this is correct, but .. it works
|
||||
|
||||
break;
|
||||
case -11: // Proficiencies ... the subIds are actually SkillLineCategories
|
||||
if (!isset($cats[1]) || $cats[1] != 10)
|
||||
array_push($visibleCols, 'classes');
|
||||
|
||||
$conditions[] = ['s.typeCat', -11];
|
||||
|
||||
if (isset($cats[1]))
|
||||
{
|
||||
if ($cats[1] == 6) // todo (med): we know Weapon(6) includes spell Shoot(3018), that has a mask; but really, ANY proficiency or petSkill should be in that mask so there is no need to differenciate
|
||||
$conditions[] = ['OR', ['s.skillLine1', SpellList::$skillLines[$cats[1]]], ['s.skillLine1', -3]];
|
||||
else
|
||||
$conditions[] = ['s.skillLine1', SpellList::$skillLines[$cats[1]]];
|
||||
|
||||
array_unshift($title, Lang::$spell['cat'][-11][$cats[1]]);
|
||||
}
|
||||
|
||||
break;
|
||||
case -13: // Glyphs
|
||||
$filter['classPanel'] = true;
|
||||
$filter['glyphPanel'] = true;
|
||||
|
||||
array_push($visibleCols, 'singleclass', 'glyphtype');
|
||||
|
||||
$conditions[] = ['s.typeCat', -13];
|
||||
|
||||
if (isset($cats[1]))
|
||||
{
|
||||
array_unshift($title, Lang::$game['cl'][$cats[1]]);
|
||||
$conditions[] = ['s.reqClassMask', 1 << ($cats[1] - 1), '&'];
|
||||
}
|
||||
|
||||
break;
|
||||
case 7: // Abilities
|
||||
$filter['classPanel'] = true;
|
||||
|
||||
array_push($visibleCols, 'level', 'singleclass', 'schools');
|
||||
|
||||
if (isset($cats[1]))
|
||||
array_unshift($title, Lang::$game['cl'][$cats[1]]);
|
||||
|
||||
$conditions[] = ['s.typeCat', [7, -2]];
|
||||
$conditions[] = [['s.cuFlags', (SPELL_CU_TRIGGERED | SPELL_CU_TALENT | CUSTOM_EXCLUDE_FOR_LISTVIEW), '&'], 0];
|
||||
|
||||
// Runeforging listed multiple times, exclude from explicit skill-listing
|
||||
// if (isset($cats[1]) && $cats[1] == 6 && isset($cats[2]) && $cats[2] != 776)
|
||||
// $conditions[] = [['s.attributes0', 0x80, '&'], 0];
|
||||
// else
|
||||
// $conditions[] = [
|
||||
// [['s.attributes0', 0x80, '&'], 0], // ~SPELL_ATTR0_HIDDEN_CLIENTSIDE
|
||||
// ['s.attributes0', 0x20, '&'], // SPELL_ATTR0_TRADESPELL (DK: Runeforging)
|
||||
// 'OR'
|
||||
// ];
|
||||
|
||||
if (isset($cats[2]))
|
||||
{
|
||||
$conditions[] = [
|
||||
'OR',
|
||||
['s.skillLine1', $cats[2]],
|
||||
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $cats[2]]]
|
||||
];
|
||||
|
||||
}
|
||||
else if (isset($cats[1]))
|
||||
{
|
||||
$conditions[] = [
|
||||
'OR',
|
||||
['s.skillLine1', $validCats[7][$cats[1]]],
|
||||
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $validCats[7][$cats[1]]]]
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
case 9: // Secondary Skills
|
||||
array_push($visibleCols, 'source');
|
||||
|
||||
$conditions[] = ['s.typeCat', 9];
|
||||
|
||||
if (isset($cats[1]))
|
||||
{
|
||||
array_unshift($title, Lang::$spell['cat'][9][$cats[1]]);
|
||||
|
||||
$conditions[] = [
|
||||
'OR',
|
||||
['s.skillLine1', $cats[1]],
|
||||
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $cats[1]]]
|
||||
];
|
||||
|
||||
if ($sf = @$shortFilter[$cats[1]])
|
||||
if (isset($cats[1]))
|
||||
{
|
||||
$txt = '';
|
||||
if ($sf[0] && $sf[1])
|
||||
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]) . Lang::$spell['relItems']['link'] . sprintf(Lang::$spell['relItems']['recipes'], $sf[1]);
|
||||
else if ($sf[0])
|
||||
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]);
|
||||
else if ($sf[1])
|
||||
$txt = sprintf(Lang::$spell['relItems']['recipes'], $sf[1]);
|
||||
$conditions[] = ['s.skillLine1', $cats[1]];
|
||||
|
||||
$note = Lang::$spell['cat'][$cats[0]][$cats[1]];
|
||||
if (is_array($note))
|
||||
$note = $note[0];
|
||||
if ($sf = @$shortFilter[$cats[1]])
|
||||
{
|
||||
$txt = '';
|
||||
if ($sf[0] && $sf[1])
|
||||
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]) . Lang::$spell['relItems']['link'] . sprintf(Lang::$spell['relItems']['recipes'], $sf[1]);
|
||||
else if ($sf[0])
|
||||
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]);
|
||||
else if ($sf[1])
|
||||
$txt = sprintf(Lang::$spell['relItems']['recipes'], $sf[1]);
|
||||
|
||||
$pageData['params']['note'] = sprintf(Lang::$spell['relItems']['base'], $txt, $note);
|
||||
$pageData['params']['sort'] = "$['skill', 'name']";
|
||||
$note = Lang::$spell['cat'][$cats[0]][$cats[1]];
|
||||
if (is_array($note))
|
||||
$note = $note[0];
|
||||
|
||||
$lv['params']['note'] = sprintf(Lang::$spell['relItems']['base'], $txt, $note);
|
||||
$lv['params']['sort'] = "$['skill', 'name']";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case 11: // Professions
|
||||
array_push($visibleCols, 'source');
|
||||
|
||||
$conditions[] = ['s.typeCat', 11];
|
||||
|
||||
if (isset($cats[2]))
|
||||
{
|
||||
array_unshift($title, Lang::$spell['cat'][11][$cats[1]][$cats[2]]);
|
||||
|
||||
if ($cats[2] == 9787) // general weaponsmithing
|
||||
$conditions[] = ['s.reqSpellId', [9787, 17039, 17040, 17041]];
|
||||
else
|
||||
$conditions[] = ['s.reqSpellId', $cats[2]];
|
||||
}
|
||||
else if (isset($cats[1]))
|
||||
{
|
||||
$x = Lang::$spell['cat'][11][$cats[1]];
|
||||
if (is_array($x))
|
||||
array_unshift($title, $x[0]);
|
||||
else
|
||||
array_unshift($title, $x);
|
||||
$conditions[] = ['s.skillLine1', $cats[1]];
|
||||
}
|
||||
|
||||
if (isset($cats[1]))
|
||||
{
|
||||
$conditions[] = ['s.skillLine1', $cats[1]];
|
||||
|
||||
if ($sf = @$shortFilter[$cats[1]])
|
||||
{
|
||||
$txt = '';
|
||||
if ($sf[0] && $sf[1])
|
||||
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]) . Lang::$spell['relItems']['link'] . sprintf(Lang::$spell['relItems']['recipes'], $sf[1]);
|
||||
else if ($sf[0])
|
||||
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]);
|
||||
else if ($sf[1])
|
||||
$txt = sprintf(Lang::$spell['relItems']['recipes'], $sf[1]);
|
||||
|
||||
$note = Lang::$spell['cat'][$cats[0]][$cats[1]];
|
||||
if (is_array($note))
|
||||
$note = $note[0];
|
||||
|
||||
$pageData['params']['note'] = sprintf(Lang::$spell['relItems']['base'], $txt, $note);
|
||||
$pageData['params']['sort'] = "$['skill', 'name']";
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case 0: // misc. Spells
|
||||
array_push($visibleCols, 'level');
|
||||
|
||||
if ($cats[0] !== null) // !any Spell (php loose comparison: (null == 0) is true)
|
||||
{
|
||||
$conditions[] = array(
|
||||
'OR',
|
||||
['s.typeCat', 0],
|
||||
['s.cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&']
|
||||
);
|
||||
|
||||
break;
|
||||
}
|
||||
case 0: // misc. Spells
|
||||
array_push($visibleCols, 'level');
|
||||
|
||||
if ($cats[0] !== null) // !any Spell (php loose comparison: (null == 0) is true)
|
||||
{
|
||||
$conditions[] = array(
|
||||
'OR',
|
||||
['s.typeCat', 0],
|
||||
['s.cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&']
|
||||
);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$spells = new SpellList($conditions, true);
|
||||
|
||||
$pageData['data'] = $spells->getListviewData();
|
||||
|
||||
$spells->addGlobalsToJscript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED);
|
||||
|
||||
// create note if search limit was exceeded; overwriting 'note' is intentional
|
||||
if ($spells->getMatches() > SQL_LIMIT_DEFAULT)
|
||||
{
|
||||
$pageData['params']['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_spellsfound', $spells->getMatches(), SQL_LIMIT_DEFAULT);
|
||||
$pageData['params']['_truncated'] = 1;
|
||||
}
|
||||
|
||||
if ($spells->filterGetError())
|
||||
$pageData['params']['_errors'] = '$1';
|
||||
|
||||
$mask = $spells->hasSetFields(['reagent1', 'skillLines', 'trainingCost']);
|
||||
|
||||
if ($mask & 0x1)
|
||||
$visibleCols[] = 'reagents';
|
||||
if (!($mask & 0x2) && $cats[0] != 9 && $cats[0] != 11)
|
||||
$hiddenCols[] = 'skill';
|
||||
if (($mask & 0x4) || $spells->getField('trainingCost'))
|
||||
$visibleCols[] = 'trainingcost';
|
||||
|
||||
if ($visibleCols)
|
||||
$pageData['params']['visibleCols'] = '$'.json_encode($visibleCols);
|
||||
|
||||
if ($hiddenCols)
|
||||
$pageData['params']['hiddenCols'] = '$'.json_encode($hiddenCols);
|
||||
$lv['data'] = $spells->getListviewData();
|
||||
|
||||
// recreate form selection
|
||||
$filter = array_merge($spells->filterGetForm('form'), $filter);
|
||||
$filter['query'] = isset($_GET['filter']) ? $_GET['filter'] : NULL;
|
||||
$filter['fi'] = $spells->filterGetForm();
|
||||
|
||||
if (isset($filter['gl']) && !is_array($filter['gl']))
|
||||
{
|
||||
while (count($path) < 4)
|
||||
$path[] = 0;
|
||||
|
||||
$path[] = $filter['gl'];
|
||||
}
|
||||
|
||||
if (!empty($filter['fi']['extraCols']))
|
||||
$pageData['params']['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)';
|
||||
$lv['params']['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)';
|
||||
|
||||
// create note if search limit was exceeded; overwriting 'note' is intentional
|
||||
if ($spells->getMatches() > SQL_LIMIT_DEFAULT)
|
||||
{
|
||||
$lv['params']['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_spellsfound', $spells->getMatches(), SQL_LIMIT_DEFAULT);
|
||||
$lv['params']['_truncated'] = 1;
|
||||
}
|
||||
|
||||
if ($spells->filterGetError())
|
||||
$lv['params']['_errors'] = '$1';
|
||||
|
||||
$mask = $spells->hasSetFields(['reagent1', 'skillLines', 'trainingCost']);
|
||||
|
||||
if ($mask & 0x1)
|
||||
$visibleCols[] = 'reagents';
|
||||
if (!($mask & 0x2) && $cats && $cats[0] != 9 && $cats[0] != 11)
|
||||
$hiddenCols[] = 'skill';
|
||||
if (($mask & 0x4) || $spells->getField('trainingCost'))
|
||||
$visibleCols[] = 'trainingcost';
|
||||
|
||||
if ($visibleCols)
|
||||
$lv['params']['visibleCols'] = '$'.json_encode($visibleCols);
|
||||
|
||||
if ($hiddenCols)
|
||||
$lv['params']['hiddenCols'] = '$'.json_encode($hiddenCols);
|
||||
|
||||
// menuId 1: Spell g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
$pageData = array(
|
||||
'page' => array(
|
||||
'title' => implode(" - ", $title),
|
||||
'path' => json_encode($path, JSON_NUMERIC_CHECK),
|
||||
'tab' => 0,
|
||||
'subCat' => $pageParam !== null ? '='.$pageParam : '',
|
||||
'reqJS' => array(
|
||||
'template/js/filters.js'
|
||||
)
|
||||
),
|
||||
'lv' => $lv
|
||||
);
|
||||
|
||||
$smarty->saveCache($cacheKey, $pageData, $filter);
|
||||
}
|
||||
|
||||
if (isset($filter['gl']) && !is_array($filter['gl']))
|
||||
{
|
||||
while (count($path) < 4)
|
||||
$path[] = 0;
|
||||
|
||||
$path[] = $filter['gl'];
|
||||
}
|
||||
|
||||
|
||||
// sort for dropdown-menus
|
||||
asort(Lang::$game['ra']);
|
||||
@@ -442,20 +454,10 @@ asort(Lang::$game['cl']);
|
||||
asort(Lang::$game['sc']);
|
||||
asort(Lang::$game['me']);
|
||||
|
||||
// menuId 1: Spell g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
$smarty->updatePageVars(array(
|
||||
'title' => implode(" - ", $title),
|
||||
'path' => "[".implode(", ", $path)."]",
|
||||
'tab' => 0,
|
||||
'subCat' => $pageParam !== null ? '='.$pageParam : '',
|
||||
'reqJS' => array(
|
||||
'template/js/filters.js'
|
||||
)
|
||||
));
|
||||
$smarty->updatePageVars($pageData['page']);
|
||||
$smarty->assign('filter', $filter);
|
||||
$smarty->assign('lang', array_merge(Lang::$main, Lang::$game, Lang::$achievement, ['colon' => Lang::$colon]));
|
||||
$smarty->assign('lvData', $pageData);
|
||||
$smarty->assign('lvData', $pageData['lv']);
|
||||
|
||||
// load the page
|
||||
$smarty->display('spells.tpl');
|
||||
|
||||
1771
search.php
1771
search.php
File diff suppressed because it is too large
Load Diff
15
template/bricks/book.tpl
Normal file
15
template/bricks/book.tpl
Normal file
@@ -0,0 +1,15 @@
|
||||
{if !empty($pageText)}
|
||||
<div class="clear"></div>
|
||||
<h3>{$lang.content}</h3>
|
||||
|
||||
<div id="book-generic"></div>
|
||||
<script>//<![CDATA[
|
||||
{strip}new Book({ldelim} parent: 'book-generic', pages: [
|
||||
{foreach from=$pageText item=page name=j}
|
||||
'{$page|escape:"javascript"}'
|
||||
{if $smarty.foreach.j.last}{else},{/if}
|
||||
{/foreach}
|
||||
]{rdelim}){/strip}
|
||||
//]]></script>
|
||||
|
||||
{/if}
|
||||
8
template/bricks/globals/object.tpl
Normal file
8
template/bricks/globals/object.tpl
Normal file
@@ -0,0 +1,8 @@
|
||||
var _ = g_objects;
|
||||
{strip}
|
||||
{foreach from=$data key=id item=item}
|
||||
_[{$id}]={ldelim}
|
||||
name_{$user.language}:'{$item.name|escape:"javascript"}'
|
||||
{rdelim};
|
||||
{/foreach}
|
||||
{/strip}
|
||||
@@ -65,21 +65,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{if !empty($pageText)}
|
||||
<div class="clear"></div>
|
||||
<h3>{$lang.content}</h3>
|
||||
|
||||
<div id="book-generic"></div>
|
||||
<script>//<![CDATA[
|
||||
{strip}new Book({ldelim} parent: 'book-generic', pages: [
|
||||
{foreach from=$pageText item=page name=j}
|
||||
'{$page|escape:"javascript"}'
|
||||
{if $smarty.foreach.j.last}{else},{/if}
|
||||
{/foreach}
|
||||
]{rdelim}){/strip}
|
||||
//]]></script>
|
||||
|
||||
{/if}
|
||||
{include file='bricks/book.tpl'}
|
||||
|
||||
<h2 class="clear">{$lang.related}</h2>
|
||||
</div>
|
||||
|
||||
@@ -5731,6 +5731,8 @@ Listview.extraCols = {
|
||||
},
|
||||
getState: function(cond) {
|
||||
switch (g_types[cond.type]) {
|
||||
case 'skill':
|
||||
return Listview.extraCols.condition.getSkillState(cond);
|
||||
case 'spell':
|
||||
return Listview.extraCols.condition.getSpellState(cond);
|
||||
case 'item':
|
||||
@@ -5745,6 +5747,26 @@ Listview.extraCols = {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
getSkillState: function(cond) {
|
||||
if (!cond.typeId || !g_skills[cond.typeId]) {
|
||||
return;
|
||||
}
|
||||
|
||||
var
|
||||
cnd = {},
|
||||
item = g_skills[cond.typeId];
|
||||
|
||||
cnd.icon = item.icon.toLowerCase();
|
||||
cnd.state = cond.status ? $WH.ct(LANG.pr_note_known) : $WH.ct(LANG.pr_note_missing);
|
||||
cnd.color = cond.status ? 'q2' : 'q10';
|
||||
cnd.name = item['name_' + g_locale.name];
|
||||
cnd.url = '?skill=' + cond.typeId;
|
||||
|
||||
if (cond.reqSkillLvl)
|
||||
cnd.name += ' (' + cond.reqSkillLvl + ')';
|
||||
|
||||
return cnd;
|
||||
},
|
||||
getSpellState: function(cond) {
|
||||
if (!cond.typeId || !g_spells[cond.typeId]) {
|
||||
return;
|
||||
|
||||
@@ -1,36 +1,31 @@
|
||||
{include file='header.tpl'}
|
||||
|
||||
<div id="main">
|
||||
<div class="main" id="main">
|
||||
<div class="main-precontents" id="main-precontents"></div>
|
||||
<div class="main-contents" id="main-contents">
|
||||
|
||||
<div id="main-precontents"></div>
|
||||
<div id="main-contents" class="main-contents">
|
||||
|
||||
<script type="text/javascript">
|
||||
{include file='bricks/community.tpl'}
|
||||
var g_pageInfo = {ldelim}type: {$page.type}, typeId: {$page.typeId}, name: '{$object.name|escape:"quotes"}'{rdelim};
|
||||
g_initPath({$page.path});
|
||||
</script>
|
||||
|
||||
{if isset($object.key) or isset($object.lockpicking) or isset($object.mining) or isset($object.herbalism)}
|
||||
<table class="infobox">
|
||||
<tr><th>{#Quick_Facts#}</th></tr>
|
||||
<tr><td><div class="infobox-spacer"></div>
|
||||
<ul>
|
||||
{if isset($object.key)}<li><div>{#Key#}{$lang.colon}<a class="q{$object.key.quality}" href="?item={$object.key.id}">[{$object.key.name}]</a></div></li>{/if}
|
||||
{if isset($object.lockpicking)}<li><div>{#Lockpickable#} (<span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, '{#Required_lockpicking_skill#}', 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()">{$object.lockpicking}</span>)</div></li>{/if}
|
||||
{if isset($object.mining)}<li><div>{#Mining#} (<span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, '{#Required_mining_skill#}', 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()">{$object.mining}</span>)</div></li>{/if}
|
||||
{if isset($object.herbalism)}<li><div>{#Herb#} (<span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, '{#Required_herb_skill#}', 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()">{$object.herbalism}</span>)</div></li>{/if}
|
||||
</ul>
|
||||
</td></tr>
|
||||
</table>
|
||||
{if !empty($announcements)}
|
||||
{foreach from=$announcements item=item}
|
||||
{include file='bricks/announcement.tpl' an=$item}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
{include file='bricks/community.tpl'}
|
||||
var g_pageInfo = {ldelim}type: {$type}, typeId: {$typeId}, name: '{$name|escape:"quotes"}'{rdelim};
|
||||
g_initPath({$path});
|
||||
//]]></script>
|
||||
|
||||
{include file='bricks/infobox.tpl'}
|
||||
|
||||
<div class="text">
|
||||
{include file='bricks/redButtons.tpl'}
|
||||
|
||||
<a href="{$wowhead}" class="button-red"><em><b><i>Wowhead</i></b><span>Wowhead</span></em></a>
|
||||
<h1>{$object.name}</h1>
|
||||
<h1>{$name}</h1>
|
||||
|
||||
{if $object.position}
|
||||
{include file='bricks/article.tpl'}
|
||||
|
||||
{if $positions}
|
||||
<div>{#This_Object_can_be_found_in#}
|
||||
{strip}
|
||||
<span id="locations">
|
||||
@@ -75,33 +70,18 @@
|
||||
<div class="clear"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var myMapper = new Mapper({ldelim}parent: 'mapper-generic', zone: '{$object.position[0].atid}'{rdelim});
|
||||
var myMapper = new Mapper({ldelim}parent: 'mapper-generic', zone: '{$position[0].atid}'{rdelim});
|
||||
$WH.gE($WH.ge('locations'), 'a')[0].onclick();
|
||||
</script>
|
||||
|
||||
{else}
|
||||
{#This_Object_cant_be_found#}
|
||||
{/if}
|
||||
|
||||
{if isset($object.pagetext)}
|
||||
<h3>Content</h3>
|
||||
<div id="book-generic"></div>
|
||||
{strip}
|
||||
<script>
|
||||
new Book({ldelim} parent: 'book-generic', pages: [
|
||||
{foreach from=$object.pagetext item=pagetext name=j}
|
||||
'{$pagetext|escape:"javascript"}'
|
||||
{if $smarty.foreach.j.last}{else},{/if}
|
||||
{/foreach}
|
||||
]{rdelim})
|
||||
</script>
|
||||
{/strip}
|
||||
{$lang.unkPosition}
|
||||
{/if}
|
||||
{include file='bricks/book.tpl'}
|
||||
|
||||
<h2 class="clear">{$lang.related}</h2>
|
||||
</div>
|
||||
|
||||
{include file='bricks/tabsRelated.tpl' tabs=$lvData.relTabs}
|
||||
{include file='bricks/tabsRelated.tpl' tabs=$lvData}
|
||||
|
||||
{include file='bricks/contribute.tpl'}
|
||||
|
||||
|
||||
@@ -1,20 +1,61 @@
|
||||
{include file='header.tpl'}
|
||||
|
||||
<div id="main">
|
||||
<div id="main-precontents"></div>
|
||||
<div id="main-contents" class="main-contents">
|
||||
<script type="text/javascript">
|
||||
g_initPath({$page.path});
|
||||
</script>
|
||||
<div class="main" id="main">
|
||||
<div class="main-precontents" id="main-precontents"></div>
|
||||
<div class="main-contents" id="main-contents">
|
||||
|
||||
<div id="lv-objects" class="listview"></div>
|
||||
{if !empty($announcements)}
|
||||
{foreach from=$announcements item=item}
|
||||
{include file='bricks/announcement.tpl' an=$item}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<script type="text/javascript">
|
||||
{include file='bricks/listviews/object.tpl' data=$objects.data params=$objects.params}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
g_initPath({$path}, {if empty($filter.query)} 0 {else} 1 {/if});
|
||||
{if !empty($filter.query)}
|
||||
Menu.modifyUrl(Menu.findItem(mn_database, [5]), {ldelim} filter: '+={$filter.query|escape:'quotes'}' {rdelim}, {ldelim} onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [5])) {rdelim});
|
||||
{/if}
|
||||
</script>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="fi" style="display: {if empty($filter.query)}none{else}block{/if};">
|
||||
<form action="?objects{$subCat}&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
|
||||
<table>
|
||||
<tr><td>{$lang.name|ucFirst}: </td><td> <input type="text" name="na" size="30" {if isset($filter.na)}value="{$filter.na|escape:'html'}" {/if}/></td></tr>
|
||||
</table>
|
||||
|
||||
<div id="fi_criteria" class="padded criteria"><div></div></div>
|
||||
<div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false">{$lang.addFilter}</a></div>
|
||||
|
||||
<div class="padded2 clear">
|
||||
<div style="float: right">{$lang.refineSearch}</div>
|
||||
{$lang.match}{$lang.colon}<input type="radio" name="ma" value="" id="ma-0" {if !isset($filter.ma)}checked="checked"{/if} /><label for="ma-0">{$lang.allFilter}</label><input type="radio" name="ma" value="1" id="ma-1" {if isset($filter.ma)}checked="checked"{/if} /><label for="ma-1">{$lang.oneFilter}</label>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="padded">
|
||||
<input type="submit" value="{$lang.applyFilter}" />
|
||||
<input type="reset" value="{$lang.resetForm}" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div class="pad"></div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
fi_init('objects');
|
||||
{foreach from=$filter.fi item=str}
|
||||
{$str}
|
||||
{/foreach}
|
||||
//]]></script>
|
||||
|
||||
<div id="lv-generic" class="listview"></div>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
{include file='bricks/listviews/object.tpl' data=$lvData.data params=$lvData.params}
|
||||
//]]></script>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div><!-- main-contents -->
|
||||
</div><!-- main -->
|
||||
|
||||
{include file='footer.tpl'}
|
||||
|
||||
@@ -12,55 +12,55 @@
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
{include file='bricks/community.tpl'}
|
||||
var g_pageInfo = {ldelim}type: {$type}, typeId: {$typeId}, name: '{$lvData.name|escape:"quotes"}'{rdelim};
|
||||
var g_pageInfo = {ldelim}type: {$type}, typeId: {$typeId}, name: '{$name|escape:"quotes"}'{rdelim};
|
||||
g_initPath({$path});
|
||||
//]]></script>
|
||||
|
||||
{include file='bricks/infobox.tpl'}
|
||||
|
||||
<div class="text">
|
||||
{include file='bricks/headIcons.tpl' icons=$lvData.icons}
|
||||
{*include file='bricks/headIcons.tpl'*}
|
||||
|
||||
{include file='bricks/redButtons.tpl'}
|
||||
|
||||
<h1{if isset($lvData.page.expansion)} class="h1-icon"><span class="{$lvData.page.expansion}-icon-right">{$lvData.page.name}</span>{else}>{$lvData.page.name}{/if}</h1>
|
||||
<h1{if isset($expansion)} class="h1-icon"><span class="{$expansion}-icon-right">{$name}</span>{else}>{$name}{/if}</h1>
|
||||
|
||||
{include file='bricks/tooltip.tpl'}
|
||||
|
||||
{if $lvData.page.reagents}
|
||||
{if $lvData.page.tools}<div style="float: left; margin-right: 75px">{/if}
|
||||
{include file='bricks/reagentList.tpl' reagents=$lvData.page.reagents[1] enhanced=$lvData.page.reagents[0]}
|
||||
{if $lvData.page.tools}</div>{/if}
|
||||
{if $reagents[0]}
|
||||
{if $tools}<div style="float: left; margin-right: 75px">{/if}
|
||||
{include file='bricks/reagentList.tpl' reagents=$reagents[1] enhanced=$reagents[0]}
|
||||
{if $tools}</div>{/if}
|
||||
{/if}
|
||||
|
||||
{if $lvData.page.tools}
|
||||
{if $lvData.page.reagents}<div style="float: left">{/if}
|
||||
{if $tools}
|
||||
{if $reagents[0]}<div style="float: left">{/if}
|
||||
<h3>{$lang.tools}</h3>
|
||||
<table class="iconlist">
|
||||
{section name=i loop=$lvData.page.tools}
|
||||
<tr><th align="right" id="iconlist-icon{$iconlist1++}"></th><td><span class="q1"><a href="{$lvData.page.tools[i].url}">{$lvData.page.tools[i].name}</a></span></td></tr>
|
||||
{section name=i loop=$tools}
|
||||
<tr><th align="right" id="iconlist-icon{$iconlist1++}"></th><td><span class="q1"><a href="{$tools[i].url}">{$tools[i].name}</a></span></td></tr>
|
||||
{/section}
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
{section name=i loop=$lvData.page.tools}{if isset($lvData.page.tools[i].itemId)}
|
||||
$WH.ge('iconlist-icon{$iconlist2++}').appendChild(g_items.createIcon({$lvData.page.tools[i].itemId}, 0, 1));
|
||||
{section name=i loop=$tools}{if isset($tools[i].itemId)}
|
||||
$WH.ge('iconlist-icon{$iconlist2++}').appendChild(g_items.createIcon({$tools[i].itemId}, 0, 1));
|
||||
{/if}{/section}
|
||||
</script>
|
||||
{if $lvData.page.reagents}</div>{/if}{
|
||||
/if}
|
||||
{if $reagents[0]}</div>{/if}
|
||||
{/if}
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
{include file='bricks/article.tpl'}
|
||||
|
||||
{*
|
||||
if !empty($lvData.page.transfer)}
|
||||
if !empty($transfer)}
|
||||
<div class="pad"></div>
|
||||
{$lang._transfer|sprintf:$lvData.page.transfer.id:´´:$lvData.page.transfer.icon:$lvData.page.transfer.name:$lvData.page.transfer.facInt:$lvData.page.transfer.facName}
|
||||
{$lang._transfer|sprintf:$transfer.id:´´:$transfer.icon:$transfer.name:$transfer.facInt:$transfer.facName}
|
||||
{/if}
|
||||
*}
|
||||
|
||||
{if isset($lvData.page.unavailable)}
|
||||
{if isset($unavailable)}
|
||||
<div class="pad"></div>
|
||||
<b style="color: red">{$lang._unavailable}</b>
|
||||
{/if}
|
||||
@@ -82,92 +82,92 @@ if !empty($lvData.page.transfer)}
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="border-left: 0; border-top: 0">{$lang.duration}</th>
|
||||
<td width="100%" style="border-top: 0">{if !empty($lvData.page.duration)}{$lvData.page.duration}{else}<span class="q0">{$lang.n_a}</span>{/if}</td>
|
||||
<td width="100%" style="border-top: 0">{if !empty($duration)}{$duration}{else}<span class="q0">{$lang.n_a}</span>{/if}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="border-left: 0">{$lang.school}</th>
|
||||
<td>{$lvData.page.school}</td>
|
||||
<td>{$school}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="border-left: 0">{$lang.mechanic}</th>
|
||||
<td width="100%" style="border-top: 0">{if $lvData.page.mechanic}{$lvData.page.mechanic}{else}<span class="q0">{$lang.n_a}</span>{/if}</td>
|
||||
<td width="100%" style="border-top: 0">{if $mechanic}{$mechanic}{else}<span class="q0">{$lang.n_a}</span>{/if}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="border-left: 0">{$lang.dispelType}</th>
|
||||
<td width="100%" style="border-top: 0">{if $lvData.page.dispel}{$lvData.page.dispel}{else}<span class="q0">{$lang.n_a}</span>{/if}</td>
|
||||
<td width="100%" style="border-top: 0">{if $dispel}{$dispel}{else}<span class="q0">{$lang.n_a}</span>{/if}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="border-bottom: 0; border-left: 0">{$lang._gcdCategory}</th>
|
||||
<td style="border-bottom: 0">{$lvData.page.gcdCat}</td>
|
||||
<td style="border-bottom: 0">{$gcdCat}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="border-top: 0">{$lang._cost}</th>
|
||||
<td style="border-top: 0">{if !empty($lvData.page.powerCost)}{$lvData.page.powerCost}{else}{$lang._none}{/if}</td>
|
||||
<td style="border-top: 0">{if !empty($powerCost)}{$powerCost}{else}{$lang._none}{/if}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang._range}</th>
|
||||
<td>{$lvData.page.range} {$lang._distUnit} <small>({$lvData.page.rangeName})</small></td>
|
||||
<td>{$range} {$lang._distUnit} <small>({$rangeName})</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang._castTime}</th>
|
||||
<td>{$lvData.page.castTime}</td>
|
||||
<td>{$castTime}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang._cooldown}</th>
|
||||
<td>{if !empty($lvData.page.cooldown)}{$lvData.page.cooldown}{else}<span class="q0">{$lang.n_a}</span>{/if}</td>
|
||||
<td>{if !empty($cooldown)}{$cooldown}{else}<span class="q0">{$lang.n_a}</span>{/if}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><dfn title="{$lang._globCD}">{$lang._gcd}</dfn></th>
|
||||
<td>{$lvData.page.gcd}</td>
|
||||
<td>{$gcd}</td>
|
||||
</tr>
|
||||
{if !empty($lvData.page.scaling)}
|
||||
{if !empty($scaling)}
|
||||
<tr>
|
||||
<th>{$lang._scaling}</th>
|
||||
<td colspan="3">{$lvData.page.scaling}</td>
|
||||
<td colspan="3">{$scaling}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if !empty($lvData.page.stances)}
|
||||
{if !empty($stances)}
|
||||
<tr>
|
||||
<th>{$lang._forms}</th>
|
||||
<td colspan="3">{$lvData.page.stances}</td>
|
||||
<td colspan="3">{$stances}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if !empty($lvData.page.items)}
|
||||
{if !empty($items)}
|
||||
<tr>
|
||||
<th>{$lang.requires2}</th>
|
||||
<td colspan="3">{$lvData.page.items}</td>
|
||||
<td colspan="3">{$items}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{section name=i loop=$lvData.page.effect}
|
||||
{section name=i loop=$effect}
|
||||
<tr>
|
||||
<th>{$lang._effect} #{$smarty.section.i.index+1}</th>
|
||||
<td colspan="3" style="line-height: 17px">
|
||||
{$lvData.page.effect[i].name}
|
||||
{$effect[i].name}
|
||||
|
||||
<small>
|
||||
{if isset($lvData.page.effect[i].value)}<br>{$lang._value}{$lang.colon}{$lvData.page.effect[i].value}{/if}
|
||||
{if isset($lvData.page.effect[i].radius)}<br>{$lang._radius}{$lang.colon}{$lvData.page.effect[i].radius} {$lang._distUnit}{/if}
|
||||
{if isset($lvData.page.effect[i].interval)}<br>{$lang._interval}{$lang.colon}{$lvData.page.effect[i].interval}{/if}
|
||||
{if isset($lvData.page.effect[i].mechanic)}<br>{$lang.mechanic}{$lang.colon}{$lvData.page.effect[i].mechanic}{/if}
|
||||
{if isset($lvData.page.effect[i].procData)}<br>{if $lvData.page.effect[i].procData[0] < 0}{$lang.ppm|sprintf:$lvData.page.effect[i].procData[0]*-1}{else}{$lang.procChance}{$lang.colon}{$lvData.page.effect[i].procData[0]}%{/if}{if $lvData.page.effect[i].procData[1]} ({$lang.cooldown|sprintf:$lvData.page.effect[i].procData[1]}){/if}{/if}
|
||||
{if isset($effect[i].value)}<br>{$lang._value}{$lang.colon}{$effect[i].value}{/if}
|
||||
{if isset($effect[i].radius)}<br>{$lang._radius}{$lang.colon}{$effect[i].radius} {$lang._distUnit}{/if}
|
||||
{if isset($effect[i].interval)}<br>{$lang._interval}{$lang.colon}{$effect[i].interval}{/if}
|
||||
{if isset($effect[i].mechanic)}<br>{$lang.mechanic}{$lang.colon}{$effect[i].mechanic}{/if}
|
||||
{if isset($effect[i].procData)}<br>{if $effect[i].procData[0] < 0}{$lang.ppm|sprintf:$effect[i].procData[0]*-1}{else}{$lang.procChance}{$lang.colon}{$effect[i].procData[0]}%{/if}{if $effect[i].procData[1]} ({$lang.cooldown|sprintf:$effect[i].procData[1]}){/if}{/if}
|
||||
</small>
|
||||
{if isset($lvData.page.effect[i].icon)}
|
||||
{if isset($effect[i].icon)}
|
||||
<table class="icontab">
|
||||
<tr>
|
||||
<th id="icontab-icon{$smarty.section.i.index}"></th>
|
||||
{if isset($lvData.page.effect[i].icon.quality)}
|
||||
<td><span class="q{$lvData.page.effect[i].icon.quality}"><a href="?item={$lvData.page.effect[i].icon.id}">{$lvData.page.effect[i].icon.name}</a></span></td>
|
||||
{if isset($effect[i].icon.quality)}
|
||||
<td><span class="q{$effect[i].icon.quality}"><a href="?item={$effect[i].icon.id}">{$effect[i].icon.name}</a></span></td>
|
||||
{else}
|
||||
<td>{if !$lvData.page.effect[i].icon.name|strpos:"#"}<a href="?spell={$lvData.page.effect[i].icon.id}">{/if}{$lvData.page.effect[i].icon.name}{if !$lvData.page.effect[i].icon.name|strpos:"#"}</a>{/if}</td>
|
||||
<td>{if !$effect[i].icon.name|strpos:"#"}<a href="?spell={$effect[i].icon.id}">{/if}{$effect[i].icon.name}{if !$effect[i].icon.name|strpos:"#"}</a>{/if}</td>
|
||||
{/if}
|
||||
<th></th><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
$WH.ge('icontab-icon{$smarty.section.i.index}').appendChild({if isset($lvData.page.effect[i].icon.quality)}g_items{else}g_spells{/if}.createIcon({$lvData.page.effect[i].icon.id}, 1, {$lvData.page.effect[i].icon.count}));
|
||||
$WH.ge('icontab-icon{$smarty.section.i.index}').appendChild({if isset($effect[i].icon.quality)}g_items{else}g_spells{/if}.createIcon({$effect[i].icon.id}, 1, {$effect[i].icon.count}));
|
||||
</script>
|
||||
{/if}
|
||||
</td>
|
||||
@@ -178,7 +178,7 @@ if !empty($lvData.page.transfer)}
|
||||
<h2 class="clear">{$lang.related}</h2>
|
||||
</div>
|
||||
|
||||
{include file='bricks/tabsRelated.tpl' tabs=$lvData.relTabs}
|
||||
{include file='bricks/tabsRelated.tpl' tabs=$lvData}
|
||||
|
||||
{include file='bricks/contribute.tpl'}
|
||||
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
{/if}
|
||||
|
||||
<script type="text/javascript">
|
||||
g_initPath({$page.path}, {if empty($filter.query)} 0 {else} 1 {/if});
|
||||
g_initPath({$path}, {if empty($filter.query)} 0 {else} 1 {/if});
|
||||
{if !empty($filter.query)}
|
||||
Menu.modifyUrl(Menu.findItem(mn_database, [1]), {ldelim} filter: '+={$filter.query|escape:'quotes'}' {rdelim}, {ldelim} onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [1])) {rdelim});
|
||||
{/if}
|
||||
</script>
|
||||
|
||||
<div id="fi" style="display: {if empty($filter.query)}none{else}block{/if};">
|
||||
<form action="?spells{$page.subCat}&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
|
||||
<form action="?spells{$subCat}&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
|
||||
<div class="rightpanel">
|
||||
<div style="float: left">{$lang.school}{$lang.colon}</div>
|
||||
<small><a href="javascript:;" onclick="document.forms['fi'].elements['sc[]'].selectedIndex = -1; return false" onmousedown="return false">{$lang.clear}</a></small>
|
||||
|
||||
Reference in New Issue
Block a user