* initial implementation
 * this includes a complete reindexing of everything touching icons
 * this also means, no linking to red-rocket-site though, they index them differently
This commit is contained in:
Sarjuuk 2017-03-29 21:23:41 +02:00
parent 4651165e4d
commit ee568da6ec
51 changed files with 1796 additions and 211 deletions

View file

@ -124,6 +124,7 @@ class CommunityContent
case TYPE_EMOTE: $obj = new EmoteList($cnd); break;
case TYPE_ENCHANTMENT: $obj = new EnchantmentList($cnd); break;
case TYPE_SOUND: $obj = new SoundList($cnd); break;
case TYPE_ICON: $obj = new IconList($cnd); break;
default: continue;
}

View file

@ -25,6 +25,7 @@ define('TYPE_RACE', 14);
define('TYPE_SKILL', 15);
define('TYPE_CURRENCY', 17);
define('TYPE_SOUND', 19);
define('TYPE_ICON', 29);
// internal types (not published to js)
define('TYPE_USER', 500);
define('TYPE_EMOTE', 501);

View file

@ -21,14 +21,15 @@ class Markup
public function parseGlobalsFromText(&$jsg = [])
{
if (preg_match_all('/(?<!\\\\)\[(npc|object|item|itemset|quest|spell|zone|faction|pet|achievement|statistic|title|event|class|race|skill|currency|emote|enchantment|money|sound)=(-?\d+)[^\]]*\]/i', $this->text, $matches, PREG_SET_ORDER))
if (preg_match_all('/(?<!\\\\)\[(npc|object|item|itemset|quest|spell|zone|faction|pet|achievement|statistic|title|event|class|race|skill|currency|emote|enchantment|money|sound|icondb)=(-?\d+)[^\]]*\]/i', $this->text, $matches, PREG_SET_ORDER))
{
foreach ($matches as $match)
{
if ($match[1] == 'statistic')
$match[1] = 'achievement';
if ($match[1] == 'money')
else if ($match[1] == 'icondb')
$match[1] = 'icon';
else if ($match[1] == 'money')
{
if (stripos($match[0], 'items'))
{
@ -50,7 +51,6 @@ class Markup
}
}
}
else if ($type = array_search($match[1], Util::$typeStrings))
$this->jsGlobals[$type][$match[2]] = $match[2];
}

View file

@ -1,6 +1,6 @@
<?php
define('AOWOW_REVISION', 24);
define('AOWOW_REVISION', 25);
define('CLI', PHP_SAPI === 'cli');

View file

@ -16,8 +16,8 @@ class AchievementList extends BaseType
protected $queryBase = 'SELECT `a`.*, `a`.`id` AS ARRAY_KEY FROM ?_achievement a';
protected $queryOpts = array(
'a' => [['si'], 'o' => 'orderInGroup ASC'],
'si' => ['j' => ['?_icons si ON si.id = a.iconId', true], 's' => ', si.iconString'],
'a' => [['ic'], 'o' => 'orderInGroup ASC'],
'ic' => ['j' => ['?_icons ic ON ic.id = a.iconId', true], 's' => ', ic.name AS iconString'],
'ac' => ['j' => ['?_achievementcriteria AS `ac` ON `ac`.`refAchievementId` = `a`.`id`', true], 'g' => '`a`.`id`']
);
@ -286,7 +286,7 @@ class AchievementListFilter extends Filter
3 => [FILTER_CR_STRING, 'reward', true ], // rewardtext
7 => [FILTER_CR_BOOLEAN, 'chainId', ], // partseries
9 => [FILTER_CR_NUMERIC, 'id', null, true], // id
10 => [FILTER_CR_STRING, 'si.iconString', ], // icon
10 => [FILTER_CR_STRING, 'ic.name', ], // icon
18 => [FILTER_CR_STAFFFLAG, 'flags', ], // flags
14 => [FILTER_CR_FLAG, 'cuFlags', CUSTOM_HAS_COMMENT ], // hascomments
15 => [FILTER_CR_FLAG, 'cuFlags', CUSTOM_HAS_SCREENSHOT ], // hasscreenshots

View file

@ -13,9 +13,19 @@ class CurrencyList extends BaseType
protected $queryBase = 'SELECT *, c.id AS ARRAY_KEY FROM ?_currencies c';
protected $queryOpts = array(
'c' => [['ic']],
'ic' => ['j' => ['?_icons ic ON ic.id = c.iconId', true], 's' => ', ic.iconString']
'ic' => ['j' => ['?_icons ic ON ic.id = c.iconId', true], 's' => ', ic.name AS iconString']
);
public function __construct($conditions = [])
{
parent::__construct($conditions);
foreach ($this->iterate() as &$_curTpl)
if (!$_curTpl['iconString'])
$_curTpl['iconString'] = 'inv_misc_questionmark';
}
public function getListviewData()
{
$data = [];

View file

@ -0,0 +1,211 @@
<?php
if (!defined('AOWOW_REVISION'))
die('illegal access');
class IconList extends BaseType
{
use listviewHelper;
public static $type = TYPE_ICON;
public static $brickFile = 'icon';
public static $dataTable = '?_icons';
public static $contribute = CONTRIBUTE_CO;
private $pseudoQry = 'SELECT iconId AS ARRAY_KEY, COUNT(*) FROM ?# WHERE iconId IN (?a) GROUP BY iconId';
private $pseudoJoin = array(
'nItems' => '?_items',
'nSpells' => '?_spell',
'nAchievements' => '?_achievement',
'nCurrencies' => '?_currencies',
'nPets' => '?_pet'
);
protected $queryBase = 'SELECT ic.*, ic.id AS ARRAY_KEY FROM ?_icons ic';
/* this works, but takes ~100x more time than i'm comfortable with .. kept as reference
protected $queryOpts = array( // 29 => TYPE_ICON
'ic' => [['s', 'i', 'a', 'c', 'p'], 'g' => 'ic.id'],
'i' => ['j' => ['?_items `i` ON `i`.`iconId` = `ic`.`id`', true], 's' => ', COUNT(DISTINCT `i`.`id`) AS nItems'],
's' => ['j' => ['?_spell `s` ON `s`.`iconId` = `ic`.`id`', true], 's' => ', COUNT(DISTINCT `s`.`id`) AS nSpells'],
'a' => ['j' => ['?_achievement `a` ON `a`.`iconId` = `ic`.`id`', true], 's' => ', COUNT(DISTINCT `a`.`id`) AS nAchievements'],
'c' => ['j' => ['?_currencies `c` ON `c`.`iconId` = `ic`.`id`', true], 's' => ', COUNT(DISTINCT `c`.`id`) AS nCurrencies'],
'p' => ['j' => ['?_pet `p` ON `p`.`iconId` = `ic`.`id`', true], 's' => ', COUNT(DISTINCT `p`.`id`) AS nPets']
);
*/
public function __construct($conditions)
{
parent::__construct($conditions);
if (!$this->getFoundIDs())
return;
foreach ($this->pseudoJoin as $var => $tbl)
{
$res = DB::Aowow()->selectCol($this->pseudoQry, $tbl, $this->getFoundIDs());
foreach ($res as $icon => $qty)
$this->templates[$icon][$var] = $qty;
}
}
// use if you JUST need the name
public static function getName($id)
{
$n = DB::Aowow()->SelectRow('SELECT name FROM ?_icons WHERE id = ?d', $id );
return Util::localizedString($n, 'name');
}
// end static use
public function getListviewData($addInfoMask = 0x0)
{
$data = [];
foreach ($this->iterate() as $__)
{
$data[$this->id] = array(
'id' => $this->id,
'name' => $this->getField('name', true, true),
'icon' => $this->getField('name', true, true),
'itemcount' => (int)$this->getField('nItems'),
'spellcount' => (int)$this->getField('nSpells'),
'achievementcount' => (int)$this->getField('nAchievements'),
'npccount' => 0, // UNUSED
'petabilitycount' => 0, // UNUSED
'currencycount' => (int)$this->getField('nCurrencies'),
'missionabilitycount' => 0, // UNUSED
'buildingcount' => 0, // UNUSED
'petcount' => (int)$this->getField('nPets'),
'threatcount' => 0, // UNUSED
'classcount' => 0 // class icons are hardcoeded and do not referenced in dbc
);
}
return $data;
}
public function getJSGlobals($addMask = GLOBALINFO_ANY)
{
$data = [];
foreach ($this->iterate() as $__)
$data[TYPE_ICON][$this->id] = ['name' => $this->getField('name', true, true), 'icon' => $this->getField('name', true, true)];
return $data;
}
public function renderTooltip() { }
}
class IconListFilter extends Filter
{
public $extraOpts = null;
// cr => [type, field, misc, extraCol]
private $criterion2field = array(
1 => '?_items', // items [num]
2 => '?_spell', // spells [num]
3 => '?_achievement', // achievements [num]
// 4 => '', // battlepets [num]
// 5 => '', // battlepetabilities [num]
6 => '?_currencies', // currencies [num]
// 7 => '', // garrisonabilities [num]
// 8 => '', // garrisonbuildings [num]
9 => '?_pet', // hunterpets [num]
// 10 => '', // garrisonmissionthreats [num]
11 => '', // classes [num]
13 => '' // used [num]
);
private $totalUses = [];
private function _getCnd($op, $val, $tbl)
{
switch ($op)
{
case '>':
case '>=':
case '=':
$ids = DB::Aowow()->selectCol('SELECT iconId AS ARRAY_KEY, COUNT(*) AS n FROM ?# GROUP BY iconId HAVING n '.$op.' '.$val, $tbl);
return $ids ? ['id', array_keys($ids)] : [1];
case '<=':
if ($val)
$op = '>';
break;
case '<':
if ($val)
$op = '>=';
break;
case '!=':
if ($val)
$op = '=';
break;
}
$ids = DB::Aowow()->selectCol('SELECT iconId AS ARRAY_KEY, COUNT(*) AS n FROM ?# GROUP BY iconId HAVING n '.$op.' '.$val, $tbl);
return $ids ? ['id', array_keys($ids), '!'] : [1];
}
protected function createSQLForCriterium(&$cr)
{
if (isset($this->criterion2field[$cr[0]]))
{
if ($cr[0] == 13 && $this->isSaneNumeric($cr[2]) && $this->int2Op($cr[1]))
{
if (!$this->totalUses)
{
foreach ($this->criterion2field as $tbl)
{
if (!$tbl)
continue;
$res = DB::Aowow()->selectCol('SELECT iconId AS ARRAY_KEY, COUNT(*) AS n FROM ?# GROUP BY iconId', $tbl);
Util::arraySumByKey($this->totalUses, $res);
}
}
if ($cr[1] == '=')
$cr[1] = '==';
$op = $cr[1];
if ($cr[1] == '<=' && $cr[2])
$op = '>';
else if ($cr[1] == '<' && $cr[2])
$op = '>=';
else if ($cr[1] == '!=' && $cr[2])
$op = '==';
$ids = array_filter($this->totalUses, function ($x) use ($op, $cr) { return eval('return '.$x.' '.$op.' '.$cr[2].';'); });
if ($cr[1] != $op)
return $ids ? ['id', array_keys($ids), '!'] : [1];
else
return $ids ? ['id', array_keys($ids)] : ['id', array_keys($this->totalUses), '!'];
}
else if ($cr[0] == 11)
return [0];
else if ($this->isSaneNumeric($cr[2]) && $this->int2Op($cr[1]))
return $this->_getCnd($cr[1], $cr[2], $this->criterion2field[$cr[0]]);
}
unset($cr);
$this->error = true;
return [1];
}
protected function createSQLForValues()
{
$parts = [];
$_v = &$this->fiData['v'];
//string
if (isset($_v['na']))
if ($_ = $this->modularizeString(['name']))
$parts[] = $_;
return $parts;
}
}
?>

View file

@ -27,7 +27,7 @@ class ItemList extends BaseType
protected $queryBase = 'SELECT i.*, i.block AS tplBlock, i.id AS ARRAY_KEY, i.id AS id FROM ?_items i';
protected $queryOpts = array( // 3 => TYPE_ITEM
'i' => [['is', 'src', 'ic'], 'o' => 'i.quality DESC, i.itemLevel DESC'],
'ic' => ['j' => ['?_icons `ic` ON `ic`.`id` = -`i`.`displayId`', true], 's' => ', ic.iconString'],
'ic' => ['j' => ['?_icons `ic` ON `ic`.`id` = `i`.`iconId`', true], 's' => ', ic.name AS iconString'],
'is' => ['j' => ['?_item_stats `is` ON `is`.`type` = 3 AND `is`.`typeId` = `i`.`id`', true], 's' => ', `is`.*'],
's' => ['j' => ['?_spell `s` ON `s`.`effect1CreateItemId` = `i`.`id`', true], 'g' => 'i.id'],
'e' => ['j' => ['?_events `e` ON `e`.`id` = `i`.`eventId`', true], 's' => ', e.holidayId'],
@ -715,10 +715,10 @@ class ItemList extends BaseType
if (!empty($enhance['g']))
{
$gems = DB::Aowow()->select('
SELECT it.id AS ARRAY_KEY, ic.iconString, ae.*, it.gemColorMask AS colorMask
SELECT it.id AS ARRAY_KEY, ic.name AS iconString, ae.*, it.gemColorMask AS colorMask
FROM ?_items it
JOIN ?_itemenchantment ae ON ae.id = it.gemEnchantmentId
JOIN ?_icons ic ON ic.id = -it.displayId
JOIN ?_icons ic ON ic.id = it.iconId
WHERE it.id IN (?a)',
$enhance['g']);
foreach ($enhance['g'] as $k => $v)
@ -1775,7 +1775,7 @@ class ItemListFilter extends Filter
59 => [FILTER_CR_NUMERIC, 'durability', null, true], // dura
104 => [FILTER_CR_STRING, 'description', true ], // flavortext
7 => [FILTER_CR_BOOLEAN, 'description_loc0', true ], // hasflavortext
142 => [FILTER_CR_STRING, 'ic.iconString', ], // icon
142 => [FILTER_CR_STRING, 'ic.name', ], // icon
12 => [FILTER_CR_BOOLEAN, 'itemset', ], // partofset
13 => [FILTER_CR_BOOLEAN, 'randomEnchant', ], // randomlyenchanted
14 => [FILTER_CR_BOOLEAN, 'pageTextId', ], // readable

View file

@ -12,7 +12,11 @@ class PetList extends BaseType
public static $brickFile = 'pet';
public static $dataTable = '?_pet';
protected $queryBase = 'SELECT *, id AS ARRAY_KEY FROM ?_pet p';
protected $queryBase = 'SELECT *, p.id AS ARRAY_KEY FROM ?_pet p';
protected $queryOpts = array(
'p' => [['ic']],
'ic' => ['j' => ['?_icons ic ON p.iconId = ic.id', true], 's' => ', ic.name AS iconString'],
);
public function getListviewData()
{

View file

@ -12,8 +12,8 @@ class SkillList extends BaseType
protected $queryBase = 'SELECT *, sl.id AS ARRAY_KEY FROM ?_skillline sl';
protected $queryOpts = array(
'sl' => [['si']],
'si' => ['j' => '?_icons si ON si.id = sl.iconId', 's' => ', si.iconString'],
'sl' => [['ic']],
'ic' => ['j' => ['?_icons ic ON ic.id = sl.iconId', true], 's' => ', ic.name AS iconString'],
);
public function __construct($conditions = [])
@ -32,6 +32,9 @@ class SkillList extends BaseType
while (count($_) < 5)
$_[] = 0;
}
if (!$_curTpl['iconId'])
$_curTpl['iconString'] = 'inv_misc_questionmark';
}
}

View file

@ -53,9 +53,9 @@ class SpellList extends BaseType
protected $queryBase = 'SELECT s.*, s.id AS ARRAY_KEY FROM ?_spell s';
protected $queryOpts = array(
's' => [['src', 'sr', 'si', 'si', 'sia']], // 6: TYPE_SPELL
'si' => ['j' => ['?_icons si ON si.id = s.iconId', true], 's' => ', IFNULL (si.iconString, "inv_misc_questionmark") AS iconString'],
'sia' => ['j' => ['?_icons sia ON sia.id = s.iconIdAlt', true], 's' => ', sia.iconString AS iconStringAlt'],
's' => [['src', 'sr', 'ic', 'ica']], // 6: TYPE_SPELL
'ic' => ['j' => ['?_icons ic ON ic.id = s.iconId', true], 's' => ', ic.name AS iconString'],
'ica' => ['j' => ['?_icons ica ON ica.id = s.iconIdAlt', true], 's' => ', ica.name AS iconStringAlt'],
'sr' => ['j' => ['?_spellrange sr ON sr.id = s.rangeId'], 's' => ', sr.rangeMinHostile, sr.rangeMinFriend, sr.rangeMaxHostile, sr.rangeMaxFriend, sr.name_loc0 AS rangeText_loc0, sr.name_loc2 AS rangeText_loc2, sr.name_loc3 AS rangeText_loc3, sr.name_loc6 AS rangeText_loc6, sr.name_loc8 AS rangeText_loc8'],
'src' => ['j' => ['?_source src ON type = 6 AND typeId = s.id', true], 's' => ', src1, src2, src3, src4, src5, src6, src7, src8, src9, src10, src11, src12, src13, src14, src15, src16, src17, src18, src19, src20, src21, src22, src23, src24']
);
@ -125,6 +125,9 @@ class SpellList extends BaseType
unset($_curTpl['skillLine1']);
unset($_curTpl['skillLine2OrMask']);
if (!$_curTpl['iconString'])
$_curTpl['iconString'] = 'inv_misc_questionmark';
}
if ($foo)
@ -2163,7 +2166,7 @@ class SpellListFilter extends Filter
12 => [FILTER_CR_FLAG, 'cuFlags', SPELL_CU_LAST_RANK ], // lastrank
13 => [FILTER_CR_NUMERIC, 'rankNo', ], // rankno
14 => [FILTER_CR_NUMERIC, 'id', null, true], // id
15 => [FILTER_CR_STRING, 'si.iconString', ], // icon
15 => [FILTER_CR_STRING, 'ic.name', ], // icon
19 => [FILTER_CR_FLAG, 'attributes0', 0x80000 ], // scaling
25 => [FILTER_CR_BOOLEAN, 'skillLevelYellow' ], // rewardsskillups
11 => [FILTER_CR_FLAG, 'cuFlags', CUSTOM_HAS_COMMENT ], // hascomments

View file

@ -40,6 +40,7 @@ class Util
null, 'CreatureList', 'GameObjectList', 'ItemList', 'ItemsetList', 'QuestList', 'SpellList',
'ZoneList', 'FactionList', 'PetList', 'AchievementList', 'TitleList', 'WorldEventList', 'CharClassList',
'CharRaceList', 'SkillList', null, 'CurrencyList', null, 'SoundList',
TYPE_ICON => 'IconList',
TYPE_EMOTE => 'EmoteList',
TYPE_ENCHANTMENT => 'EnchantmentList'
);
@ -48,6 +49,7 @@ class Util
null, 'npc', 'object', 'item', 'itemset', 'quest', 'spell', 'zone', 'faction',
'pet', 'achievement', 'title', 'event', 'class', 'race', 'skill', null, 'currency',
null, 'sound',
TYPE_ICON => 'icon',
TYPE_USER => 'user',
TYPE_EMOTE => 'emote',
TYPE_ENCHANTMENT => 'enchantment'
@ -195,6 +197,7 @@ class Util
public static $filterResultString = '$$WH.sprintf(LANG.lvnote_filterresults, \'%s\')';
public static $tryFilteringString = '$$WH.sprintf(%s, %s, %s) + LANG.dash + LANG.lvnote_tryfiltering.replace(\'<a>\', \'<a href="javascript:;" onclick="fi_toggle()">\')';
public static $tryFilteringEntityString = '$$WH.sprintf(LANG.lvnote_entitiesfound, %s, %s, %s) + LANG.dash + LANG.lvnote_tryfiltering.replace(\'<a>\', \'<a href="javascript:;" onclick="fi_toggle()">\')';
public static $tryNarrowingString = '$$WH.sprintf(%s, %s, %s) + LANG.dash + LANG.lvnote_trynarrowing';
public static $setCriteriaString = "fi_setCriteria(%s, %s, %s);\n";

View file

@ -39,6 +39,8 @@ switch ($pageCall)
case 'factions':
// case 'guild':
// case 'guilds':
case 'icon':
case 'icons':
case 'item':
case 'items':
case 'itemset':
@ -64,7 +66,7 @@ switch ($pageCall)
case 'search': // tool: searches
case 'skill':
case 'skills':
case 'sound': // db: sounds for zone, creature, spell, ...
case 'sound':
case 'sounds':
case 'spell':
case 'spells':

View file

@ -19,6 +19,7 @@ class Lang
private static $event;
private static $faction;
private static $gameObject;
private static $icon;
private static $item;
private static $itemset;
private static $npc;

View file

@ -202,6 +202,8 @@ $lang = array(
'faction' => "Fraktion",
'factions' => "Fraktionen",
'cooldown' => "%s Abklingzeit",
'icon' => "Icon",
'icons' => "Icons",
'item' => "Gegenstand",
'items' => "Gegenstände",
'itemset' => "Ausrüstungsset",
@ -682,6 +684,9 @@ $lang = array(
-2 => "Nicht kategorisiert"
)
),
'icon' => array(
'notFound' => "Dieses Icon existiert nicht."
),
'title' => array(
'notFound' => "Dieser Titel existiert nicht.",
'_transfer' => 'Dieser Titel wird mit <a href="?title=%d" class="q1">%s</a> vertauscht, wenn Ihr zur <span class="icon-%s">%s</span> wechselt.',

View file

@ -197,6 +197,8 @@ $lang = array(
'faction' => "faction",
'factions' => "Factions",
'cooldown' => "%s cooldown",
'icon' => "icon",
'icons' => "icons",
'item' => "item",
'items' => "Items",
'itemset' => "item Set",
@ -677,6 +679,9 @@ $lang = array(
-2 => "Uncategorized"
)
),
'icon' => array(
'notFound' => "This icon doesn't exist."
),
'title' => array(
'notFound' => "This title doesn't exist.",
'_transfer' => 'This title will be converted to <a href="?title=%d" class="q1">%s</a> if you transfer to <span class="icon-%s">%s</span>.',

View file

@ -202,6 +202,8 @@ $lang = array(
'faction' => "facción",
'factions' => "Facciones",
'cooldown' => "%s de reutilización",
'icon' => "icono",
'icons' => "Iconos",
'item' => "objeto",
'items' => "Objetos",
'itemset' => "conjunto de objetos",
@ -683,6 +685,9 @@ $lang = array(
-2 => "Sin categoría"
)
),
'icon' => array(
'notFound' => "Este icono no existe."
),
'title' => array(
'notFound' => "Este título no existe.",
'_transfer' => 'Este título será convertido a <a href="?title=%d" class="q1">%s</a> si lo transfieres a la <span class="icon-%s">%s</span>.',

View file

@ -202,6 +202,8 @@ $lang = array(
'faction' => "faction",
'factions' => "Factions",
'cooldown' => "%s de recharge",
'icon' => "icône",
'icons' => "Icônes",
'item' => "objet",
'items' => "Objets",
'itemset' => "ensemble d'objets",
@ -375,7 +377,7 @@ $lang = array(
'newPassDiff' => "Votre nouveau mot de passe doit être différent de l'ancien." // message_newpassdifferent
),
'user' => array(
'notFound' => "Utilisateur \"%s\" non trouvé !",
'notFound' => "Utilisateur \"%s\" non trouvé!",
'removed' => "(Supprimé)",
'joinDate' => "Inscription",
'lastLogin' => "Dernière visite",
@ -681,6 +683,9 @@ $lang = array(
-2 => "Non classés"
)
),
'icon' => array(
'notFound' => "Cette icône n'existe pas."
),
'title' => array(
'notFound' => "Ce titre n'existe pas.",
'_transfer' => 'Ce titre sera converti en <a href="?title=%d" class="q1">%s</a> si vous transférez en <span class="icon-%s">%s</span>.',

View file

@ -202,6 +202,8 @@ $lang = array(
'faction' => "фракция",
'factions' => "Фракции",
'cooldown' => "Восстановление: %s",
'icon' => "иконка",
'icons' => "Иконки",
'item' => "предмет",
'items' => "Предметы",
'itemset' => "комплект",
@ -682,6 +684,9 @@ $lang = array(
-2 => "Разное"
)
),
'icon' => array(
'notFound' => "Этой иконки не существует"
),
'title' => array(
'notFound' => "Такое звание не существует.",
'_transfer' => 'Этот предмет превратится в <a href="?title=%d" class="q1">%s</a>, если вы перейдете за <span class="icon-%s">%s</span>.',

View file

@ -523,7 +523,7 @@ class AchievementPage extends GenericPage
$x = '$WowheadPower.registerAchievement('.$this->typeId.', '.User::$localeId.",{\n";
$x .= "\tname_".User::$localeString.": '".Util::jsEscape($this->subject->getField('name', true))."',\n";
$x .= "\ticon: '".urlencode($this->subject->getField('iconString'))."',\n";
$x .= "\ticon: '".rawurlencode($this->subject->getField('iconString', true, true))."',\n";
$x .= "\ttooltip_".User::$localeString.": '".$this->subject->renderTooltip()."'\n";
$x .= "});";

View file

@ -218,7 +218,7 @@ class CurrencyPage extends GenericPage
$x = '$WowheadPower.registerCurrency('.$this->typeId.', '.User::$localeId.", {\n";
$x .= "\tname_".User::$localeString.": '".Util::jsEscape($this->subject->getField('name', true))."',\n";
$x .= "\ticon: '".urlencode($this->subject->getField('iconString'))."',\n";
$x .= "\ticon: '".rawurlencode($this->subject->getField('iconString', true, true))."',\n";
$x .= "\ttooltip_".User::$localeString.": '".$this->subject->renderTooltip()."'\n";
$x .= "});";

View file

@ -336,7 +336,7 @@ class EventPage extends GenericPage
$x .= "\tname_".User::$localeString.": '".Util::jsEscape($this->subject->getField('name', true))."',\n";
if ($this->subject->getField('iconString') != 'trade_engineering')
$x .= "\ticon: '".urlencode($this->subject->getField('iconString'))."',\n";
$x .= "\ticon: '".rawurlencode($this->subject->getField('iconString', true, true))."',\n";
$x .= "\ttooltip_".User::$localeString.": '".$this->subject->renderTooltip()."'\n";
$x .= "});";

View file

@ -120,6 +120,7 @@ class GenericPage
'event' => ['template' => 'holiday', 'id' => 'holidays', 'parent' => 'lv-generic', 'data' => [], 'name' => '$LANG.tab_holidays' ],
'faction' => ['template' => 'faction', 'id' => 'factions', 'parent' => 'lv-generic', 'data' => [], 'name' => '$LANG.tab_factions' ],
'genericmodel' => ['template' => 'genericmodel', 'id' => 'same-model-as', 'parent' => 'lv-generic', 'data' => [], 'name' => '$LANG.tab_samemodelas' ],
'icongallery' => ['template' => 'icongallery', 'id' => 'icons', 'parent' => 'lv-generic', 'data' => [] ],
'item' => ['template' => 'item', 'id' => 'items', 'parent' => 'lv-generic', 'data' => [], 'name' => '$LANG.tab_items' ],
'itemset' => ['template' => 'itemset', 'id' => 'itemsets', 'parent' => 'lv-generic', 'data' => [], 'name' => '$LANG.tab_itemsets' ],
'model' => ['template' => 'model', 'id' => 'gallery', 'parent' => 'lv-generic', 'data' => [], 'name' => '$LANG.tab_gallery' ],
@ -696,6 +697,7 @@ class GenericPage
case TYPE_SKILL: $jsg[TYPE_SKILL] = ['g_skills', [], []]; break;
case TYPE_CURRENCY: $jsg[TYPE_CURRENCY] = ['g_gatheredcurrencies', [], []]; break;
case TYPE_SOUND: $jsg[TYPE_SOUND] = ['g_sounds', [], []]; break;
case TYPE_ICON: $jsg[TYPE_ICON] = ['g_icons', [], []]; break;
// well, this is awkward
case TYPE_USER: $jsg[TYPE_USER] = ['g_users', [], []]; break;
case TYPE_EMOTE: $jsg[TYPE_EMOTE] = ['g_emotes', [], []]; break;

101
pages/icon.php Normal file
View file

@ -0,0 +1,101 @@
<?php
if (!defined('AOWOW_REVISION'))
die('illegal access');
// menuId 31: Icons g_initPath()
// tabId 0: Database g_initHeader()
class IconPage extends GenericPage
{
use DetailPage;
protected $type = TYPE_ICON;
protected $typeId = 0;
protected $tpl = 'icon';
protected $path = [0, 31];
protected $tabId = 0;
protected $mode = CACHE_TYPE_PAGE;
public function __construct($pageCall, $id)
{
parent::__construct($pageCall, $id);
$this->typeId = intVal($id);
$this->subject = new IconList(array(['id', $this->typeId]));
if ($this->subject->error)
$this->notFound(Util::ucFirst(Lang::game('icon')), Lang::icon('notFound'));
$this->extendGlobalData($this->subject->getJSGlobals());
$this->name = Util::ucFirst($this->subject->getField('name'));
$this->icon = $this->subject->getField('name', true, true);
}
protected function generateContent()
{
/****************/
/* Main Content */
/****************/
$this->redButtons = array(
BUTTON_LINKS => ['type' => $this->type, 'typeId' => $this->typeId],
BUTTON_WOWHEAD => false
);
/**************/
/* Extra Tabs */
/**************/
// used by: spell
$ubSpells = new SpellList(array(['iconId', $this->typeId]));
if (!$ubSpells->error)
{
$this->extendGlobalData($ubSpells->getJsGlobals());
$this->lvTabs[] = [SpellList::$brickFile, ['data' => array_values($ubSpells->getListviewData())]];
}
// used by: item
$ubItems = new ItemList(array(['iconId', $this->typeId]));
if (!$ubItems->error)
{
$this->extendGlobalData($ubItems->getJsGlobals());
$this->lvTabs[] = [ItemList::$brickFile, ['data' =>array_values( $ubItems->getListviewData())]];
}
// used by: achievement
$ubAchievements = new AchievementList(array(['iconId', $this->typeId]));
if (!$ubAchievements->error)
{
$this->extendGlobalData($ubAchievements->getJsGlobals());
$this->lvTabs[] = [AchievementList::$brickFile, ['data' => array_values($ubAchievements->getListviewData())]];
}
// used by: currency
$ubCurrencies = new CurrencyList(array(['iconId', $this->typeId]));
if (!$ubCurrencies->error)
{
$this->extendGlobalData($ubCurrencies->getJsGlobals());
$this->lvTabs[] = [CurrencyList::$brickFile, ['data' => array_values($ubCurrencies->getListviewData())]];
}
// used by: hunter pet
$ubPets = new PetList(array(['iconId', $this->typeId]));
if (!$ubPets->error)
{
$this->extendGlobalData($ubPets->getJsGlobals());
$this->lvTabs[] = [PetList::$brickFile, ['data' => array_values($ubPets->getListviewData())]];
}
}
protected function generateTitle()
{
array_unshift($this->title, $this->name, Util::ucFirst(Lang::game('icon')));
}
protected function generatePath() { }
}
?>

108
pages/icons.php Normal file
View file

@ -0,0 +1,108 @@
<?php
if (!defined('AOWOW_REVISION'))
die('illegal access');
// menuId 31: Icons g_initPath()
// tabId 0: Database g_initHeader()
class IconsPage extends GenericPage
{
use ListPage;
protected $type = TYPE_ICON;
protected $tpl = 'icons';
protected $path = [0, 31];
protected $tabId = 0;
protected $mode = CACHE_TYPE_PAGE;
protected $js = ['filters.js'];
public function __construct($pageCall, $pageParam)
{
$this->filterObj = new IconListFilter();
$this->getCategoryFromUrl($pageParam);;
parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::game('icons'));
}
protected function generateContent()
{
$tabData = array(
'data' => [],
);
$sqlLimit = 600; // fits better onto the grid
$conditions = [$sqlLimit];
if (!User::isInGroup(U_GROUP_EMPLOYEE))
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
if ($_ = $this->filterObj->getConditions())
$conditions[] = $_;
$icons = new IconList($conditions);
$tabData['data'] = array_values($icons->getListviewData());
$this->extendGlobalData($icons->getJSGlobals());
// recreate form selection
$this->filter = array_merge($this->filterObj->getForm('form'), $this->filter);
$this->filter['query'] = isset($_GET['filter']) ? $_GET['filter'] : null;
$this->filter['fi'] = $this->filterObj->getForm();
if ($icons->getMatches() > $sqlLimit)
{
$tabData['note'] = sprintf(Util::$tryFilteringEntityString, $icons->getMatches(), 'LANG.types[29][3]', $sqlLimit);
$tabData['_truncated'] = 1;
}
if ($this->filterObj->error)
$tabData['_errors'] = '$1';
$this->lvTabs[] = ['icongallery', $tabData];
}
protected function generateTitle()
{
$setCrt = $this->filterObj->getForm('setCriteria', true);
$title = $this->name;
if (isset($setCrt['cr']) && count($setCrt['cr']) == 1)
{
switch ($setCrt['cr'][0])
{
case 1:
$title = Util::ucFirst(Lang::game('item')).' '.$title;
break;
case 2:
$title = Util::ucFirst(Lang::game('spell')).' '.$title;
break;
case 3:
$title = Util::ucFirst(Lang::game('achievement')).' '.$title;
break;
case 6:
$title = Util::ucFirst(Lang::game('currency')).' '.$title;
break;
case 9:
$title = Util::ucFirst(Lang::game('pet')).' '.$title;
break;
case 11:
$title = Util::ucFirst(Lang::game('class')).' '.$title;
break;
}
}
array_unshift($this->title, $title);
}
protected function generatePath()
{
$setCrt = $this->filterObj->getForm('setCriteria', true);
if (isset($setCrt['cr']) && count($setCrt['cr']) == 1)
$this->path[] = $setCrt['cr'][0];
}
}
?>

View file

@ -1010,7 +1010,7 @@ class ItemPage extends genericPage
$x = '$WowheadPower.registerItem(\''.$itemString.'\', '.User::$localeId.", {\n";
$x .= "\tname_".User::$localeString.": '".Util::jsEscape($this->subject->getField('name', true, $this->enhancedTT))."',\n";
$x .= "\tquality: ".$this->subject->getField('quality').",\n";
$x .= "\ticon: '".urlencode($this->subject->getField('iconString'))."',\n";
$x .= "\ticon: '".rawurlencode($this->subject->getField('iconString', true, true))."',\n";
$x .= "\ttooltip_".User::$localeString.": '".Util::jsEscape($this->subject->renderTooltip(false, 0, $this->enhancedTT))."'\n";
$x .= "});";

View file

@ -247,7 +247,7 @@ class SpellPage extends GenericPage
if ($this->subject->getField('effect'.$i.'Id') == 74)
$glyphId = $this->subject->getField('effect'.$i.'MiscValue');
if ($_ = DB::Aowow()->selectCell('SELECT si.iconString FROM ?_glyphproperties gp JOIN ?_icons si ON gp.iconId = si.id WHERE gp.spellId = ?d { OR gp.id = ?d }', $this->typeId, $glyphId ?: DBSIMPLE_SKIP))
if ($_ = DB::Aowow()->selectCell('SELECT ic.name FROM ?_glyphproperties gp JOIN ?_icons ic ON gp.iconId = ic.id WHERE gp.spellId = ?d { OR gp.id = ?d }', $this->typeId, $glyphId ?: DBSIMPLE_SKIP))
if (file_exists('static/images/wow/Interface/Spellbook/'.$_.'.png'))
$infobox .= '[img src='.STATIC_URL.'/images/wow/Interface/Spellbook/'.$_.'.png border=0 float=center margin=15]';
@ -1138,8 +1138,8 @@ class SpellPage extends GenericPage
$pt = [];
if ($n = $this->subject->getField('name', true))
$pt[] = "\tname_".User::$localeString.": '".Util::jsEscape($n)."'";
if ($i = $this->subject->getField('iconString'))
$pt[] = "\ticon: '".urlencode($i)."'";
if ($i = $this->subject->getField('iconString', true, true))
$pt[] = "\ticon: '".rawurlencode($i)."'";
if ($tt = $this->subject->renderTooltip())
{
$pt[] = "\ttooltip_".User::$localeString.": '".Util::jsEscape($tt[0])."'";
@ -1186,14 +1186,14 @@ class SpellPage extends GenericPage
return false;
$item = DB::Aowow()->selectRow('
SELECT name_loc0, name_loc2, name_loc3, name_loc6, name_loc8, i.id, ic.iconString, quality,
SELECT name_loc0, name_loc2, name_loc3, name_loc6, name_loc8, i.id, ic.name AS iconString, quality,
IF ( (spellId1 > 0 AND spellCharges1 < 0) OR
(spellId2 > 0 AND spellCharges2 < 0) OR
(spellId3 > 0 AND spellCharges3 < 0) OR
(spellId4 > 0 AND spellCharges4 < 0) OR
(spellId5 > 0 AND spellCharges5 < 0), 1, 0) AS consumed
FROM ?_items i
LEFT JOIN ?_icons ic ON ic.id = i.displayId
LEFT JOIN ?_icons ic ON ic.id = i.iconId
WHERE i.id = ?d',
$_iId
);
@ -1238,9 +1238,9 @@ class SpellPage extends GenericPage
SELECT reagent1, reagent2, reagent3, reagent4, reagent5, reagent6, reagent7, reagent8,
reagentCount1, reagentCount2, reagentCount3, reagentCount4, reagentCount5, reagentCount6, reagentCount7, reagentCount8,
name_loc0, name_loc2, name_loc3, name_loc6, name_loc8,
s.id AS ARRAY_KEY, iconString
s.id AS ARRAY_KEY, ic.name AS iconString
FROM ?_spell s
JOIN ?_icons si ON iconId = si.id
JOIN ?_icons ic ON s.iconId = ic.id
WHERE (effect1CreateItemId = ?d AND effect1Id = 24)',// OR
// (effect2CreateItemId = ?d AND effect2Id = 24) OR
// (effect3CreateItemId = ?d AND effect3Id = 24)',

View file

@ -177,7 +177,8 @@ CREATE TABLE `aowow_achievement` (
`parentCat` smallint(6) NOT NULL,
`points` tinyint(3) unsigned NOT NULL,
`orderInGroup` tinyint(3) unsigned NOT NULL,
`iconId` mediumint(8) unsigned NOT NULL,
`iconId` smallint(5) unsigned NOT NULL DEFAULT '0',
`iconIdBak` smallint(5) unsigned NOT NULL DEFAULT '0',
`flags` smallint(5) unsigned NOT NULL,
`reqCriteriaCount` tinyint(3) unsigned NOT NULL,
`refAchievement` smallint(5) unsigned NOT NULL,
@ -198,7 +199,8 @@ CREATE TABLE `aowow_achievement` (
`reward_loc3` varchar(92) NOT NULL,
`reward_loc6` varchar(83) NOT NULL,
`reward_loc8` varchar(95) NOT NULL,
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
KEY `iconId` (`iconId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -540,7 +542,7 @@ CREATE TABLE `aowow_currencies` (
`id` int(16) NOT NULL,
`category` mediumint(8) NOT NULL,
`cuFlags` int(10) unsigned NOT NULL,
`iconId` mediumint(9) NOT NULL,
`iconId` smallint(5) unsigned NOT NULL DEFAULT '0',
`itemId` int(16) NOT NULL,
`cap` mediumint(8) unsigned NOT NULL,
`name_loc0` varchar(64) NOT NULL,
@ -553,7 +555,8 @@ CREATE TABLE `aowow_currencies` (
`description_loc3` varchar(256) NOT NULL,
`description_loc6` varchar(256) NOT NULL,
`description_loc8` varchar(256) NOT NULL,
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
KEY `iconId` (`iconId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -716,7 +719,8 @@ CREATE TABLE `aowow_glyphproperties` (
`id` smallint(5) unsigned NOT NULL,
`spellId` mediumint(11) unsigned NOT NULL,
`typeFlags` tinyint(3) unsigned NOT NULL,
`iconId` smallint(5) unsigned NOT NULL,
`iconId` smallint(5) unsigned NOT NULL DEFAULT '0',
`iconIdBak` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -1146,6 +1150,7 @@ CREATE TABLE `aowow_items` (
`name_loc3` varchar(127) DEFAULT NULL,
`name_loc6` varchar(127) DEFAULT NULL,
`name_loc8` varchar(127) DEFAULT NULL,
`iconId` smallint(5) unsigned NOT NULL DEFAULT '0',
`displayId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spellVisualId` smallint(5) unsigned NOT NULL DEFAULT '0',
`quality` tinyint(3) unsigned NOT NULL DEFAULT '0',
@ -1293,7 +1298,8 @@ CREATE TABLE `aowow_items` (
KEY `idx_name` (`name_loc0`),
KEY `items_index` (`class`),
KEY `idx_model` (`displayId`),
KEY `idx_faction` (`requiredFaction`)
KEY `idx_faction` (`requiredFaction`).
KEY `iconId` (`iconId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -1488,7 +1494,7 @@ CREATE TABLE `aowow_pet` (
`name_loc3` varchar(64) NOT NULL,
`name_loc6` varchar(64) NOT NULL,
`name_loc8` varchar(64) NOT NULL,
`iconString` varchar(128) NOT NULL,
`iconId` smallint(5) unsigned NOT NULL DEFAULT '0',
`skillLineId` mediumint(9) NOT NULL,
`spellId1` mediumint(9) NOT NULL,
`spellId2` mediumint(9) NOT NULL,
@ -1497,7 +1503,8 @@ CREATE TABLE `aowow_pet` (
`armor` mediumint(9) NOT NULL,
`damage` mediumint(9) NOT NULL,
`health` mediumint(9) NOT NULL,
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
KEY `iconId` (`iconId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -1891,7 +1898,8 @@ CREATE TABLE `aowow_skillline` (
`description_loc3` text NOT NULL,
`description_loc6` text NOT NULL,
`description_loc8` text NOT NULL,
`iconId` smallint(5) unsigned NOT NULL,
`iconId` smallint(5) unsigned NOT NULL DEFAULT '0',
`iconIdBak` smallint(5) unsigned NOT NULL DEFAULT '0',
`professionMask` smallint(5) unsigned NOT NULL,
`recipeSubClass` tinyint(3) unsigned NOT NULL,
`specializations` varchar(30) NOT NULL COMMENT 'space-separated spellIds',
@ -2126,8 +2134,9 @@ CREATE TABLE `aowow_spell` (
`effect1BonusMultiplier` float NOT NULL,
`effect2BonusMultiplier` float NOT NULL,
`effect3BonusMultiplier` float NOT NULL,
`iconId` smallint(5) unsigned NOT NULL,
`iconIdAlt` mediumint(9) NOT NULL,
`iconId` smallint(5) unsigned NOT NULL DEFAULT '0',
`iconIdBak` smallint(5) unsigned NOT NULL DEFAULT '0',
`iconIdAlt` smallint(5) unsigned NOT NULL DEFAULT '0',
`rankNo` tinyint(3) unsigned NOT NULL,
`spellVisualId` smallint(5) unsigned NOT NULL,
`name_loc0` varchar(85) NOT NULL,
@ -2173,7 +2182,8 @@ CREATE TABLE `aowow_spell` (
KEY `category` (`typeCat`),
KEY `spell` (`id`) USING BTREE,
KEY `effects` (`effect1Id`,`effect2Id`,`effect3Id`),
KEY `items` (`effect1CreateItemId`,`effect2CreateItemId`,`effect3CreateItemId`)
KEY `items` (`effect1CreateItemId`,`effect2CreateItemId`,`effect3CreateItemId`),
KEY `iconId` (`iconId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -2656,7 +2666,7 @@ UNLOCK TABLES;
LOCK TABLES `aowow_dbversion` WRITE;
/*!40000 ALTER TABLE `aowow_dbversion` DISABLE KEYS */;
INSERT INTO `aowow_dbversion` VALUES (1490789226,0,NULL,NULL);
INSERT INTO `aowow_dbversion` VALUES (1490815302,0,NULL,NULL);
/*!40000 ALTER TABLE `aowow_dbversion` ENABLE KEYS */;
UNLOCK TABLES;

View file

@ -450,6 +450,14 @@ if (!CLI)
if ($missing = array_diff(array_map('strtolower', $dbcEntries), array_map('strtolower', $allPaths)))
{
// hide affected icons from listviews
$iconNames = array_map(function($path) {
preg_match('/\/([^\/]+)\.blp$/i', $path, $m);
return $m ? $m[1] : null;
}, $missing);
var_dump($iconNames);
DB::Aowow()->query('UPDATE ?_icons SET cuFlags = cuFlags | ?d WHERE name IN (?a)', CUSTOM_EXCLUDE_FOR_LISTVIEW, $iconNames);
asort($missing);
CLISetup::log('the following '.count($missing).' images where referenced by DBC but not in the mpqData directory. They may need to be converted by hand later on.', CLISetup::LOG_WARN);
foreach ($missing as $m)

View file

@ -28,7 +28,6 @@ class SqlGen
private static $tables = array( // [dbcName, saveDbc, AowowDeps, TCDeps]
'achievementcategory' => ['achievement_category', false, null, null],
'achievementcriteria' => ['achievement_criteria', false, null, null],
'glyphproperties' => ['glyphproperties', true, null, null],
'itemenchantmentcondition' => ['spellitemenchantmentcondition', false, null, null],
'itemextendedcost' => ['itemextendedcost', false, null, null],
'itemlimitcategory' => ['itemlimitcategory', false, null, null],
@ -41,37 +40,38 @@ class SqlGen
'spellrange' => ['spellrange', false, null, null],
'spellvariables' => ['spelldescriptionvariables', false, null, null],
'totemcategory' => ['totemcategory', false, null, null],
'talents' => [null, null, null, null],
'classes' => [null, null, null, null],
'factions' => [null, null, null, null],
'factiontemplate' => [null, null, null, null],
'holidays' => [null, null, null, null],
'icons' => [null, null, null, null],
'itemrandomenchant' => [null, null, null, null],
'races' => [null, null, null, null],
'shapeshiftforms' => [null, null, null, null],
'skillline' => [null, null, null, null],
'emotes' => [null, null, null, null],
'sounds' => [null, null, null, null],
'itemenchantment' => [null, null, null, ['spell_enchant_proc_data']],
'achievement' => [null, null, null, ['dbc_achievement', 'disables']],
'creature' => [null, null, null, ['creature_template', 'creature_template_locale', 'creature_classlevelstats', 'instance_encounters']],
'currencies' => [null, null, null, ['item_template', 'locales_item']],
'events' => [null, null, null, ['game_event', 'game_event_prerequisite']],
'objects' => [null, null, null, ['gameobject_template', 'gameobject_template_locale', 'gameobject_questitem']],
'pet' => [null, null, null, ['creature_template', 'creature']],
'quests' => [null, null, null, ['quest_template', 'quest_template_addon', 'locales_quest', 'game_event', 'game_event_seasonal_questrelation', 'disables']],
'quests_startend' => [null, null, null, ['creature_queststarter', 'creature_questender', 'game_event_creature_quest', 'gameobject_queststarter', 'gameobject_questender', 'game_event_gameobject_quest', 'item_template']],
'spell' => [null, null, null, ['skill_discovery_template', 'item_template', 'creature_template', 'creature_template_addon', 'smart_scripts', 'npc_trainer', 'disables', 'spell_ranks', 'spell_dbc']],
'spelldifficulty' => [null, null, null, ['spelldifficulty_dbc']],
'taxi' /* nodes + paths */ => [null, null, null, ['creature_template', 'creature']],
'titles' => [null, null, null, ['quest_template', 'game_event_seasonal_questrelation', 'game_event', 'achievement_reward']],
'items' => [null, null, null, ['item_template', 'locales_item', 'spell_group', 'game_event']],
'spawns' /* + waypoints */ => [null, null, null, ['creature', 'creature_addon', 'gameobject', 'gameobject_template', 'vehicle_accessory', 'vehicle_accessory_template', 'script_waypoint', 'waypoints', 'waypoint_data']],
'zones' => [null, null, null, ['access_requirement']],
'itemset' => [null, null, ['spell'], ['item_template', 'game_event']],
'item_stats' /* + ench */ => [null, null, ['items', 'spell'], null],
'source' => [null, null, ['spell', 'achievement'], ['npc_vendor', 'game_event_npc_vendor', 'creature', 'quest_template', 'quest_template_addon', 'playercreateinfo_item', 'npc_trainer', 'skill_discovery_template', 'playercreateinfo_skills', 'achievement_reward', 'skill_perfect_item_template']]
'icons' => [null, null, null, null],
'glyphproperties' => [null, true, ['icons'], null],
'talents' => [null, null, null, null],
'classes' => [null, null, null, null],
'factions' => [null, null, null, null],
'factiontemplate' => [null, null, null, null],
'holidays' => [null, null, null, null],
'itemrandomenchant' => [null, null, null, null],
'races' => [null, null, null, null],
'shapeshiftforms' => [null, null, null, null],
'skillline' => [null, null, ['icons'], null],
'emotes' => [null, null, null, null],
'sounds' => [null, null, null, null],
'itemenchantment' => [null, null, null, ['spell_enchant_proc_data']],
'achievement' => [null, null, ['icons'], ['dbc_achievement', 'disables']],
'creature' => [null, null, null, ['creature_template', 'creature_template_locale', 'creature_classlevelstats', 'instance_encounters']],
'currencies' => [null, null, null, ['item_template', 'locales_item']],
'events' => [null, null, null, ['game_event', 'game_event_prerequisite']],
'objects' => [null, null, null, ['gameobject_template', 'gameobject_template_locale', 'gameobject_questitem']],
'pet' => [null, null, ['icons'], ['creature_template', 'creature']],
'quests' => [null, null, null, ['quest_template', 'quest_template_addon', 'locales_quest', 'game_event', 'game_event_seasonal_questrelation', 'disables']],
'quests_startend' => [null, null, null, ['creature_queststarter', 'creature_questender', 'game_event_creature_quest', 'gameobject_queststarter', 'gameobject_questender', 'game_event_gameobject_quest', 'item_template']],
'spell' => [null, null, ['icons'], ['skill_discovery_template', 'item_template', 'creature_template', 'creature_template_addon', 'smart_scripts', 'npc_trainer', 'disables', 'spell_ranks', 'spell_dbc']],
'spelldifficulty' => [null, null, null, ['spelldifficulty_dbc']],
'taxi' /* nodes + paths */ => [null, null, null, ['creature_template', 'creature']],
'titles' => [null, null, null, ['quest_template', 'game_event_seasonal_questrelation', 'game_event', 'achievement_reward']],
'items' => [null, null, ['icons'], ['item_template', 'locales_item', 'spell_group', 'game_event']],
'spawns' /* + waypoints */ => [null, null, null, ['creature', 'creature_addon', 'gameobject', 'gameobject_template', 'vehicle_accessory', 'vehicle_accessory_template', 'script_waypoint', 'waypoints', 'waypoint_data']],
'zones' => [null, null, null, ['access_requirement']],
'itemset' => [null, null, ['spell'], ['item_template', 'game_event']],
'item_stats' /* + ench */ => [null, null, ['items', 'spell'], null],
'source' => [null, null, ['spell', 'achievement'], ['npc_vendor', 'game_event_npc_vendor', 'creature', 'quest_template', 'quest_template_addon', 'playercreateinfo_item', 'npc_trainer', 'skill_discovery_template', 'playercreateinfo_skills', 'achievement_reward', 'skill_perfect_item_template']]
);
public static $cliOpts = [];

View file

@ -16,14 +16,47 @@ if (!CLI)
$customData = array(
1956 => ['itemExtra' => 44738]
);
$reqDBC = ['achievement_category', 'achievement'];
$reqDBC = ['achievement_category', 'achievement', 'spellicon'];
function achievement(array $ids = [])
{
if ($ids)
DB::Aowow()->query('DELETE FROM ?_achievement WHERE id IN (?a)', $ids);
else
DB::Aowow()->query('INSERT IGNORE INTO ?_achievement SELECT a.id, 2 - a.faction, a.map, 0, 0, a.category, ac.parentCategory, a.points, a.orderInGroup, a.iconId, a.flags, a.reqCriteriaCount, a.refAchievement, 0, 0, a.name_loc0, a.name_loc2, a.name_loc3, a.name_loc6, a.name_loc8, a.description_loc0, a.description_loc2, a.description_loc3, a.description_loc6, a.description_loc8, a.reward_loc0, a.reward_loc2, a.reward_loc3, a.reward_loc6, a.reward_loc8 FROM dbc_achievement a LEFT JOIN dbc_achievement_category ac ON ac.id = a.category');
{
DB::Aowow()->query('
REPLACE INTO
?_achievement
SELECT
a.id,
2 - a.faction,
a.map,
0,
0,
a.category,
ac.parentCategory,
a.points,
a.orderInGroup,
IFNULL(i.id, 0),
a.iconId,
a.flags,
a.reqCriteriaCount,
a.refAchievement,
0,
0,
a.name_loc0, a.name_loc2, a.name_loc3, a.name_loc6, a.name_loc8,
a.description_loc0, a.description_loc2, a.description_loc3, a.description_loc6, a.description_loc8,
a.reward_loc0, a.reward_loc2, a.reward_loc3, a.reward_loc6, a.reward_loc8
FROM
dbc_achievement a
LEFT JOIN
dbc_achievement_category ac ON ac.id = a.category
LEFT JOIN
dbc_spellicon si ON si.id = a.iconId
LEFT JOIN
?_icons i ON LOWER(SUBSTRING_INDEX(si.iconPath, "\\\\", -1)) = i.name
');
}
// serverside achievements
$serverAchievements = DB::World()->select('SELECT ID, IF(requiredFaction = -1, 3, IF(requiredFaction = 0, 2, 1)) AS "faction", mapID, points, flags, count, refAchievement FROM achievement_dbc{ WHERE id IN (?a)}',

View file

@ -40,7 +40,7 @@ function currencies(array $ids = [])
else
{
CLISetup::log('item #'.$itemId.' required by currency #'.$cId.' not in item_template', CLISetup::LOG_WARN);
$strings = ['name_loc0' => 'Item #'.$itemId.' not in DB', 'iconId' => -1240, 'cuFlags' => CUSTOM_EXCLUDE_FOR_LISTVIEW, 'category' => 3];
$strings = ['name_loc0' => 'Item #'.$itemId.' not in DB', 'iconId' => 0, 'cuFlags' => CUSTOM_EXCLUDE_FOR_LISTVIEW, 'category' => 3];
}
DB::Aowow()->query('UPDATE ?_currencies SET ?a WHERE itemId = ?d', $strings, $itemId);
@ -49,7 +49,18 @@ function currencies(array $ids = [])
// apply icons
$displayIds = DB::World()->selectCol('SELECT entry AS ARRAY_KEY, displayid FROM item_template WHERE entry IN (?a)', $moneyItems);
foreach ($displayIds as $itemId => $iconId)
DB::Aowow()->query('UPDATE ?_currencies SET iconId = ?d WHERE itemId = ?d', -$iconId, $itemId);
DB::Aowow()->query('
UPDATE
?_currencies c,
?_icons i,
dbc_itemdisplayinfo idi
SET
c.iconId = i.id
WHERE
i.name = LOWER(idi.inventoryIcon1) AND
idi.id = ?d AND
c.itemId = ?d
', $iconId, $itemId);
return true;
}

View file

@ -0,0 +1,20 @@
<?php
if (!defined('AOWOW_REVISION'))
die('illegal access');
if (!CLI)
die('not in cli mode');
$reqDBC = ['glyphproperties', 'spellicon'];
function glyphproperties()
{
DB::Aowow()->query('REPLACE INTO ?_glyphproperties SELECT id, spellId, typeFlags, 0, iconId FROM dbc_glyphproperties');
DB::Aowow()->query('UPDATE ?_glyphproperties gp, ?_icons ic, dbc_spellicon si SET gp.iconId = ic.id WHERE gp.iconIdBak = si.id AND ic.name = LOWER(SUBSTRING_INDEX(si.iconPath, "\\\\", -1))');
return true;
}
?>

View file

@ -13,12 +13,20 @@ $reqDBC = ['spellicon', 'itemdisplayinfo'];
function icons()
{
DB::Aowow()->query('TRUNCATE ?_icons');
DB::Aowow()->query('ALTER TABLE ?_icons AUTO_INCREMENT = 1');
$baseQuery = '
REPLACE INTO
?_icons
SELECT Id, LOWER(SUBSTRING_INDEX(iconPath, "\\\\", -1)) FROM dbc_spellicon
INSERT INTO ?_icons (`name`) SELECT x FROM
(
(SELECT LOWER(SUBSTRING_INDEX(iconPath, "\\\\", -1)) AS x FROM dbc_spellicon WHERE iconPath LIKE "%icons%")
UNION
SELECT -Id, LOWER(inventoryIcon1) FROM dbc_itemdisplayinfo';
(SELECT LOWER(inventoryIcon1) AS x FROM dbc_itemdisplayinfo WHERE inventoryIcon1 <> "")
) y
GROUP BY
x
ORDER BY
x ASC';
DB::Aowow()->query($baseQuery);

View file

@ -36,6 +36,7 @@ function items(array $ids = [])
SoundOverrideSubclass,
IFNULL(sg.id, 0) AS subSubClass,
name, IFNULL(li.name_loc2, ""), IFNULL(li.name_loc3, ""), IFNULL(li.name_loc6, ""), IFNULL(li.name_loc8, ""),
0 AS iconId,
displayid,
0 AS spellVisualId,
Quality,
@ -153,6 +154,9 @@ function items(array $ids = [])
// get modelString
DB::Aowow()->query('UPDATE ?_items i, dbc_itemdisplayinfo idi SET i.model = IF(idi.leftModelName = "", idi.rightModelName, idi.leftModelName) WHERE i.displayId = idi.id');
// get iconId
DB::Aowow()->query('UPDATE ?_items i, dbc_itemdisplayinfo idi, ?_icons ic SET i.iconId = ic.id WHERE i.displayId = idi.id AND LOWER(idi.inventoryIcon1) = ic.name');
// unify slots: Robes => Chest; Ranged (right) => Ranged
DB::Aowow()->query('UPDATE ?_items SET slot = 15 WHERE slotbak = 26');
DB::Aowow()->query('UPDATE ?_items SET slot = 5 WHERE slotbak = 20');

View file

@ -33,12 +33,14 @@ function pet(array $ids = [])
0, -- exotic
0, -- expansion
name_loc0, name_loc2, name_loc3, name_lo6, name_loc8,
LOWER(SUBSTRING_INDEX(iconString, "\\\\", -1)),
ic.id,
skillLine1,
0, 0, 0, 0, -- spell[1-4]
0, 0, 0 -- armor, damage, health
FROM
dbc_creaturefamily f
LEFT JOIN
?_icons ic ON ic.name = LOWER(SUBSTRING_INDEX(f.iconString, "\\\\", -1))
WHERE
petTalentType <> -1';

View file

@ -7,7 +7,7 @@ if (!CLI)
die('not in cli mode');
$customData = array(
393 => ['professionMask' => 0x0000, 'iconId' => 736], // Skinning
393 => ['professionMask' => 0x0000], // Skinning
171 => ['professionMask' => 0x0001, 'recipeSubClass' => 6, 'specializations' => '28677 28675 28672'], // Alchemy
164 => ['professionMask' => 0x0002, 'recipeSubClass' => 4, 'specializations' => '9788 9787 17041 17040 17039'], // Blacksmithing
185 => ['professionMask' => 0x0004, 'recipeSubClass' => 5], // Cooking
@ -21,7 +21,6 @@ $customData = array(
356 => ['professionMask' => 0x0400, 'recipeSubClass' => 9], // Fishing
182 => ['professionMask' => 0x0800], // Herbalism
773 => ['professionMask' => 0x1000, 'recipeSubClass' => 11], // Inscription
633 => ['iconId' => 936], // lockpicking
785 => ['name_loc0' => 'Pet - Wasp'], // Pet - Wasp
781 => ['name_loc2' => 'Familier - diablosaure exotique'], // Pet - Exotic Devilsaur
758 => ['name_loc6' => 'Mascota: Evento - Control remoto', 'name_loc3' => 'Tier - Ereignis Ferngesteuert', 'categoryId' => 7], // Pet - Event - Remote Control
@ -35,7 +34,7 @@ function skillline()
REPLACE INTO
?_skillline
SELECT
Id, categoryId, 0, categoryId, name_loc0, name_loc2, name_loc3, name_loc6, name_loc8, description_loc0, description_loc2, description_loc3, description_loc6, description_loc8, iconId, 0, 0, ""
Id, categoryId, 0, categoryId, name_loc0, name_loc2, name_loc3, name_loc6, name_loc8, description_loc0, description_loc2, description_loc3, description_loc6, description_loc8, 0, iconId, 0, 0, ""
FROM
dbc_skillline';
@ -47,11 +46,30 @@ function skillline()
DB::Aowow()->query('UPDATE ?_skillline SET typeCat = -6 WHERE id IN (778, 788, 758) OR (categoryId = 7 AND name_loc0 LIKE "%pet%")');
// more complex fixups
DB::Aowow()->query('UPDATE ?_skillline sl, dbc_spell s, dbc_skilllineability sla SET sl.iconId = s.iconId WHERE (s.effect1Id IN (25, 26, 40) OR s.effect2Id = 60) AND sla.spellId = s.id AND sl.id = sla.skillLineId');
DB::Aowow()->query('UPDATE ?_skillline SET name_loc8 = REPLACE(name_loc8, " - ", ": ") WHERE categoryId = 7 OR id IN (758, 788)');
DB::Aowow()->query('UPDATE ?_skillline SET iconId = ?d WHERE iconId = 0', 1776); // inv_misc_questionmark
DB::Aowow()->query('UPDATE ?_skillline SET cuFlags = ?d WHERE id IN (?a)', CUSTOM_EXCLUDE_FOR_LISTVIEW, [142, 148, 149, 150, 152, 155, 183, 533, 553, 554, 713, 769]);
// apply icons
DB::Aowow()->query('UPDATE ?_skillline sl, ?_icons ic, dbc_spellicon si SET sl.iconId = ic.id WHERE sl.iconIdBak = si.id AND ic.name = LOWER(SUBSTRING_INDEX(si.iconPath, "\\\\", -1))');
DB::Aowow()->query('
UPDATE
?_skillline sl,
dbc_spell s,
dbc_skilllineability sla,
?_icons ic,
dbc_spellicon si
SET
sl.iconId = ic.id
WHERE
(s.effect1Id IN (25, 26, 40) OR s.effect2Id = 60) AND
ic.name = LOWER(SUBSTRING_INDEX(si.iconPath, "\\\\", -1)) AND
s.iconId = si.id AND
sla.spellId = s.id AND
sl.id = sla.skillLineId
');
DB::Aowow()->query('UPDATE ?_skillline sl, ?_icons ic SET sl.iconId = ic.id WHERE ic.name = ? AND sl.id = ?d', 'inv_misc_pelt_wolf_01', 393);
DB::Aowow()->query('UPDATE ?_skillline sl, ?_icons ic SET sl.iconId = ic.id WHERE ic.name = ? AND sl.id = ?d', 'inv_misc_key_03', 633);
return true;
}

View file

@ -32,7 +32,8 @@ $reqDBC = [
'skillraceclassinfo',
'talent',
'talenttab',
'glyphproperties'
'glyphproperties',
'spellicon'
];
function spell()
@ -85,8 +86,8 @@ function spell()
EffectSpellClassMaskA1, EffectSpellClassMaskA2, EffectSpellClassMaskA3,
EffectSpellClassMaskB1, EffectSpellClassMaskB2, EffectSpellClassMaskB3,
EffectSpellClassMaskC1, EffectSpellClassMaskC2, EffectSpellClassMaskC3,
0 AS spellVisualId1, 0 AS spellVisualId2,
0 AS iconId, 0 AS iconIdActive,
0 AS iconId, 0 AS iconIdAlt,
0 AS rankId, 0 AS spellVisualId1,
CONCAT("Serverside - ",Comment) AS name_loc0,CONCAT("Serverside - ",Comment) AS name_loc2,CONCAT("Serverside - ",Comment) AS name_loc3,CONCAT("Serverside - ",Comment) AS name_loc6,CONCAT("Serverside - ",Comment) AS name_loc8,
"" AS rank_loc0, "" AS rank_loc2, "" AS rank_loc3, "" AS rank_loc6, "" AS rank_loc8,
"" AS description_loc0, "" AS description_loc2, "" AS description_loc3, "" AS description_loc6, "" AS description_loc8,
@ -175,9 +176,8 @@ function spell()
effect1SpellClassMaskC, effect2SpellClassMaskC, effect3SpellClassMaskC,
effect1DamageMultiplier, effect2DamageMultiplier, effect3DamageMultiplier,
effect1BonusMultiplier, effect2BonusMultiplier, effect3BonusMultiplier,
iconId, 0 AS iconIdAlt,
0 AS rankId,
spellVisualId1,
0 AS iconId, iconId AS iconIdBak, 0 AS iconIdAlt,
0 AS rankId, spellVisualId1,
name_loc0, name_loc2, name_loc3, name_loc6, name_loc8,
rank_loc0, rank_loc2, rank_loc3, rank_loc6, rank_loc8,
description_loc0, description_loc2, description_loc3, description_loc6, description_loc8,
@ -286,6 +286,8 @@ function spell()
ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL = 2 not used for now
*/
CLISetup::log(' - linking with skillineability');
$results = DB::Aowow()->select('SELECT spellId AS ARRAY_KEY, Id AS ARRAY_KEY2, skillLineId, reqRaceMask, reqClassMask, reqSkillLevel, acquireMethod, skillLevelGrey, skillLevelYellow FROM dbc_skilllineability sla');
foreach ($results as $spellId => $sets)
{
@ -443,6 +445,8 @@ function spell()
/* talent related */
/******************/
CLISetup::log(' - linking with talent');
for ($i = 1; $i < 6; $i++)
{
// classMask
@ -463,6 +467,8 @@ function spell()
/* Other */
/*********/
CLISetup::log(' - misc fixups & icons');
// FU [FixUps]
DB::Aowow()->query('UPDATE ?_spell SET reqRaceMask = ?d WHERE skillLine1 = ?d', 1 << 10, 760); // Draenai Racials
DB::Aowow()->query('UPDATE ?_spell SET reqRaceMask = ?d WHERE skillLine1 = ?d', 1 << 9, 756); // Bloodelf Racials
@ -494,7 +500,7 @@ function spell()
$itemInfo = DB::World()->select('SELECT entry AS ARRAY_KEY, displayId AS d, Quality AS q FROM item_template WHERE entry IN (?a)', $itemSpells);
foreach ($itemSpells as $sId => $itemId)
if (isset($itemInfo[$itemId]))
DB::Aowow()->query('UPDATE ?_spell SET iconIdAlt = ?d, cuFlags = cuFlags | ?d WHERE id = ?d', -$itemInfo[$itemId]['d'], ((7 - $itemInfo[$itemId]['q']) << 8), $sId);
DB::Aowow()->query('UPDATE ?_spell s, ?_icons ic, dbc_spellicon si SET s.iconIdAlt = ?d, s.cuFlags = s.cuFlags | ?d WHERE s.iconIdBak = si.id AND ic.name = LOWER(SUBSTRING_INDEX(si.iconPath, "\\\\", -1)) AND s.id = ?d', -$itemInfo[$itemId]['d'], ((7 - $itemInfo[$itemId]['q']) << 8), $sId);
// apply specializations [trainerTemplate => reqSpell]
$specs = array(
@ -516,11 +522,15 @@ function spell()
DB::Aowow()->query('UPDATE ?_spell SET reqSpellId = id WHERE id IN (?a)', [9788, 9787, 20222, 20219, 10660, 10656, 10658, 26797, 26798, 26801, 17039, 17040, 17041]);
// setting icons
DB::Aowow()->query('UPDATE ?_spell s, ?_icons ic, dbc_spellicon si SET s.iconId = ic.id WHERE s.iconIdBak = si.id AND ic.name = LOWER(SUBSTRING_INDEX(si.iconPath, "\\\\", -1))');
/**************/
/* Categories */
/**************/
CLISetup::log(' - applying categories');
// player talents (-2)
DB::Aowow()->query('UPDATE ?_spell s, dbc_talent t SET s.typeCat = -2 WHERE t.tabId NOT IN (409, 410, 411) AND (s.Id = t.rank1 OR s.Id = t.rank2 OR s.Id = t.rank3 OR s.Id = t.rank4 OR s.Id = t.rank5)');
@ -635,6 +645,8 @@ function spell()
/* Glyphs */
/**********/
CLISetup::log(' - fixing glyph data');
// glyphSpell => affectedSpell
$glyphAffects = array(
63959 => 50842, // Pestilence
@ -667,8 +679,10 @@ function spell()
);
$queryIcons = '
SELECT s.id, s.name_loc0, s.skillLine1 as skill, s.iconId as icon, s.typeCat * s.typeCat AS prio
SELECT s.id, s.name_loc0, s.skillLine1 as skill, ic.id as icon, s.typeCat * s.typeCat AS prio
FROM ?_spell s
LEFT JOIN dbc_spellicon si ON s.iconIdBak = si.id
LEFT JOIN ?_icons ic ON ic.name = LOWER(SUBSTRING_INDEX(si.iconPath, "\\\\", -1))
WHERE [WHERE] AND (s.cuFlags & ?d) = 0 AND s.typeCat IN (0, 7, -2) -- not triggered; class spells first, talents second, unk last
ORDER BY prio DESC
';
@ -704,10 +718,8 @@ function spell()
// first: manuall replace
if ($applyId == 57144) // has no skillLine.. :/
{
$icons = [
'skill' => 253,
'icon' => 163 // ability_poisonsting
];
DB::Aowow()->query('UPDATE ?_spell s, ?_icons ic SET s.skillLine1 = ?d, s.iconIdAlt = ic.id WHERE s.id = ?d AND ic.name = ?', 253, 57144, 'ability_poisonsting');
continue;
}
// second: search by name and Family equality

View file

@ -0,0 +1,45 @@
DROP TABLE IF EXISTS `aowow_icons`;
CREATE TABLE `aowow_icons` (
`id` SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT,
`cuFlags` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`name` VARCHAR(55) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
INDEX `name` (`name`)
) COLLATE='utf8_general_ci' ENGINE=MyISAM AUTO_INCREMENT=1;
ALTER TABLE `aowow_items`
ADD COLUMN `iconId` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `name_loc8`,
ADD INDEX `iconId` (`iconId`);
ALTER TABLE `aowow_spell`
CHANGE COLUMN `iconId` `iconId` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `effect3BonusMultiplier`,
ADD COLUMN `iconIdBak` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `iconId`,
CHANGE COLUMN `iconIdAlt` `iconIdAlt` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `iconIdBak`,
ADD INDEX `iconId` (`iconId`);
ALTER TABLE `aowow_achievement`
ALTER `iconId` DROP DEFAULT;
ALTER TABLE `aowow_achievement`
CHANGE COLUMN `iconId` `iconId` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `orderInGroup`,
ADD COLUMN `iconIdBak` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `iconId`,
ADD INDEX `iconId` (`iconId`);
ALTER TABLE `aowow_skillline`
CHANGE COLUMN `iconId` `iconId` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `description_loc8`,
ADD COLUMN `iconIdBak` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `iconId`;
ALTER TABLE `aowow_glyphproperties`
CHANGE COLUMN `iconId` `iconId` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `typeFlags`,
ADD COLUMN `iconIdBak` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `iconId`;
ALTER TABLE `aowow_currencies`
ALTER `iconId` DROP DEFAULT;
ALTER TABLE `aowow_currencies`
CHANGE COLUMN `iconId` `iconId` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `cuFlags`,
ADD INDEX `iconId` (`iconId`);
ALTER TABLE `aowow_pet`
CHANGE COLUMN `iconString` `iconId` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `name_loc8`,
ADD INDEX `iconId` (`iconId`);
UPDATE `aowow_dbversion` SET `sql` = CONCAT(IFNULL(`sql`, ''), ' icons glyphproperties skillline items spell pet achievement'), `build` = CONCAT(IFNULL(`build`, ''), ' simpleImg');

View file

@ -1790,6 +1790,47 @@ Variations:
padding: 3px;
}
.listview-mode-flexgrid {
display:-ms-flexbox;
display:-webkit-flex;
display:flex;
-webkit-flex-direction:row;
-ms-flex-direction:row;
flex-direction:row;
-webkit-flex-wrap:wrap;
-ms-flex-wrap:wrap;
flex-wrap:wrap;
-webkit-justify-content:flex-start;
-ms-flex-pack:start;
justify-content:flex-start;
-webkit-align-content:flex-start;
-ms-flex-line-pack:start;
align-content:flex-start;
-webkit-align-items:stretch;
-ms-flex-align:stretch;
align-items:stretch;
}
.listview-mode-flexgrid:after {
clear:both;
content:' ';
display:block;
}
.listview-mode-flexgrid > div {
float:left;
width:20%;
}
.listview-mode-flexgrid.clickable > div {
border-radius:4px;
cursor:pointer;
}
.listview-mode-flexgrid.clickable > div:hover {
background:#1b1b1b;
}
.listview tr.mergerow {
background-color: #131d1a;
}
@ -1868,6 +1909,187 @@ td.checked .listview-cb:hover {
font-family:Verdana, "Open Sans", Arial, "Helvetica Neue", Helvetica, sans-serif;
}
.listview-sort-options {
cursor:default;
}
.listview-sort-options a {
background:#1c1c1c;
display:inline-block;
height:22px;
line-height:22px;
margin:0 1px 4px;
padding:0 8px;
text-shadow:-1px -1px 1px rgba(0, 0, 0, 0.3);
}
.listview-sort-options a:first-child {
border-radius:99px 0 0 99px;
padding-left:10px;
}
.listview-sort-options a:last-child {
border-radius:0 99px 99px 0;
padding-right:10px;
}
.listview-sort-options a:first-child:last-child {
border-radius:99px;
}
.listview-sort-options .active {
background-color:#333 !important;
color:#fff;
cursor:default;
text-decoration:none;
}
.listview-sort-options .sortasc, .listview-sort-options .sortdesc {
padding-right:8px !important;
}
.listview-sort-options .sortasc:last-child, .listview-sort-options .sortdesc:last-child {
padding-right:10px !important;
}
.listview-sort-options .sortasc:after, .listview-sort-options .sortdesc:after {
display:inline-block;
font:normal normal normal 14px/1 FontAwesome;
font-size:inherit;
text-rendering:auto;
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale;
}
.listview-sort-options .sortasc:after, .listview-sort-options .sortdesc:after {
color:#9d9d9d;
margin-left:5px;
}
.listview-sort-options .sortasc:after {
content:"\f0d8";
position:relative;
top:-2px;
}
.listview-sort-options .sortdesc:after {
content:"\f0d7";
}
.icon-cell {
padding:10px 0;
position:relative;
text-align:center;
}
.icon-cell .iconlarge {
float:none;
margin:0 auto;
}
.icon-cell .icon-cell-name {
margin:0 auto;
overflow:hidden;
text-align:center;
text-overflow:ellipsis;
white-space:nowrap;
width:calc(100% - 10px);
}
.icon-cell .icon-cell-overlay-placer {
display:none;
left:50%;
position:absolute;
top:-20px;
z-index:2;
}
.icon-cell:hover .icon-cell-overlay-placer {
display:block;
}
.icon-cell:hover>.iconlarge {
visibility:hidden;
}
.icon-cell .icon-cell-overlay {
background:rgba(27, 27, 27, 0);
border-radius:4px;
box-shadow:0 3px 10px rgba(0, 0, 0, 0);
box-sizing:border-box;
left:-87px;
padding:10px;
position:absolute;
transition:150ms;
transition-timing-function:ease-out;
width:174px;
}
.icon-cell:hover.animate .icon-cell-overlay {
background:rgba(27, 27, 27, 1);
box-shadow:0 3px 10px rgba(0, 0, 0, .35);
}
.icon-cell .icon-cell-overlay * {
opacity:0;
transition:opacity 150ms;
transition-timing-function:ease-out;
}
.icon-cell:hover.animate .icon-cell-overlay * {
opacity:1;
}
.icon-cell .icon-cell-overlay .iconlarge {
margin-bottom:5px;
position:relative;
top:20px;
transition:top 150ms !important;
}
.icon-cell .icon-cell-overlay .iconlarge, .icon-cell .icon-cell-overlay .iconlarge * {
opacity:1 !important;
}
.icon-cell:hover.animate .icon-cell-overlay .iconlarge {
top:0;
}
.icon-cell .icon-cell-overlay input[type="text"] {
box-sizing:border-box;
font-size:11px;
margin:0;
padding:3px 6px;
width:calc(100% - 38px);
}
.icon-cell .icon-cell-overlay .btn {
margin:0 0 0 10px;
padding:4px 6px;
}
.icon-cell .icon-cell-overlay .btn.fa:before {
padding-right:0 !important;
}
.icon-cell .icon-cell-overlay .icon-cell-overlay-name {
position:relative;
z-index:1;
}
.icon-cell .icon-cell-overlay .icon-cell-overlay-name .ui-effects-wrapper {
display:inline;
}
.icon-cell .icon-cell-overlay .icon-cell-overlay-counts {
font-size:11px;
margin:5px 0 0;
}
.icon-cell .icon-cell-overlay .icon-cell-overlay-counts div {
line-height:1.5;
}
.live-search {
position: absolute;
z-index: 100000001;
@ -4107,3 +4329,18 @@ span#toplinks-rep a {
margin: 0px;
color: #0C9722;
}
/* icondb fa-replacement custom */
input.button-copy {
background: #333 url(../images/icons/pages.gif) no-repeat scroll center;
margin-left: 5px;
padding: 2px;
box-shadow: 1px 1px 5px 2px rgba(0,0,0,1);
border: 0px;
border-radius: 3px;
width: 24px
}
input.button-copy:hover {
background-color: #444;
}

View file

@ -27,6 +27,11 @@ MarkupSourceMap[MARKUP_SOURCE_LIVE] = 'live';
MarkupSourceMap[MARKUP_SOURCE_PTR] = 'ptr';
MarkupSourceMap[MARKUP_SOURCE_BETA] = 'beta';
var MarkupDomainRegexMap = {
betaPtrLang: /^(beta|legion|wod|mop|ptr|www|ko|fr|de|cn|es|ru|pt|it)$/,
lang: /^(www|fr|de|es|ru)$/ // Aowowo - /^(www|ko|fr|de|cn|es|ru|pt|it)$/
};
var Markup = {
MODE_COMMENT: MARKUP_MODE_COMMENT,
MODE_REPLY: MARKUP_MODE_REPLY,
@ -193,8 +198,8 @@ var Markup = {
unnamed: { req: true, valid: /^[0-9]+$/ },
diff: { req: false, valid: /^[0-9]+$/ },
icon: { req: false, valid: /^false$/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang },
tempname: { req: false }
},
@ -347,8 +352,8 @@ var Markup = {
{
unnamed: { req: true, valid: /^[0-9]+$/ },
icon: { req: false, valid: /^false$/i },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang }
},
validate: function(attr)
{
@ -444,8 +449,8 @@ var Markup = {
unnamed: { req: true, valid: /^[0-9]+$/ },
amount: { req: false, valid: /^[0-9\:]+$/ },
icon: { req: false, valid: /^false$/i },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang }
},
allowedClass: MARKUP_CLASS_STAFF,
validate: function(attr)
@ -605,8 +610,8 @@ var Markup = {
attr:
{
unnamed: { req: true, valid: /^[0-9]+$/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang }
},
validate: function(attr)
{
@ -645,8 +650,8 @@ var Markup = {
attr:
{
unnamed: { req: true, valid: /^[0-9]+$/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang }
},
validate: function(attr)
{
@ -685,8 +690,8 @@ var Markup = {
attr:
{
unnamed: { req: true, valid: /^-?[0-9]+$/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang }
},
allowedClass: MARKUP_CLASS_STAFF,
validate: function(attr)
@ -727,8 +732,8 @@ var Markup = {
attr:
{
unnamed: { req: true, valid: /^[0-9]+$/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang }
},
validate: function(attr)
{
@ -921,7 +926,8 @@ var Markup = {
preset : { req: false, valid: /\S+/ }
},
allowedClass: MARKUP_CLASS_STAFF,
presets: {
presets:
{
boss: g_staticUrl + '/images/icons/boss.gif',
heroic: g_staticUrl + '/images/icons/heroic.gif'
},
@ -980,6 +986,80 @@ var Markup = {
}
}
},
icondb:
{
empty: true,
allowInReplies: true,
attr:
{
unnamed: { req: true, valid: /^[0-9]+$/ },
block: { req: false, valid: /^(true|false)$/ },
size: { req: false, valid: /^(tiny|small|medium|large)$/ },
name: { req: false, valid: /^true$/ },
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang },
diff: { req: false, valid: /^[0-9]+$/ },
tempname: { req: false }
},
validate: function(attr)
{
if ((attr.domain || attr.site) && Markup.dbpage)
return false;
return true
},
toHtml: function(attr) {
var size = attr.size ? attr.size : 'small';
var hasName = attr.name == 'true';
var id = attr.unnamed;
var domain = Markup._getDatabaseDomainInfo(attr);
var url = domain[0];
var href = url + '?icon=' + id;
var rel = [];
var tempname = null;
if (attr.diff);
rel.push('diff=' + attr.diff);
if (attr.tempname)
tempname = attr.tempname;
if (g_icons[id] && g_icons[id].name)
{
// href += '/' + $WH.urlize(g_icons[id].name); AoWoW - not used
var icon = g_icons[id];
if (hasName)
{
if (size == 'tiny')
return '<a href="' + href + '"' + (rel.length ? ' rel="' + rel.join('&') + '"' : '') + (!attr.icon ? ' class="icontiny"><img src="' + g_staticUrl + '/images/wow/icons/tiny/' + icon.icon.toLowerCase() + '.gif" align="absmiddle"' : '') + Markup._addGlobalAttributes(attr) + '> ' + Markup._safeHtml(icon.name) + '</a>'
else
{
var a = $WH.ce('a', { href: href });
var div = $WH.ce('div', null, a);
$WH.ae(a, Icon.create(icon.name, Icon.sizeIds[size], null, false, null, null, null, null, true));
a.innerHTML += Markup._safeHtml(icon.name);
return div.innerHTML;
}
}
else
{
var div = $WH.ce('div');
$WH.ae(div, Icon.create(icon.name, Icon.sizeIds[size], null, href, null, null, null, null, attr.block != 'true'));
return div.innerHTML;
}
}
return '<a href="' + href + '"' + (rel.length ? ' rel="' + rel.join('&') + '"' : '') + Markup._addGlobalAttributes(attr) + '>' + (tempname ? tempname : ('(' + LANG.types[29][0] + ' #' + id + ')')) + '</a>';
},
toText: function(attr)
{
var id = attr.unnamed;
if(g_icons[id] && g_icons[id].name)
return Markup._safeHtml(g_icons[id].name);
return LANG.types[29][0] + ' #' + id;
}
},
iconlist:
{
empty: false,
@ -988,7 +1068,7 @@ var Markup = {
rtrim: true,
attr:
{
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang }
},
taglessSkip: true,
allowedClass: MARKUP_CLASS_STAFF,
@ -1187,8 +1267,8 @@ var Markup = {
{
unnamed: { req: true, valid: /^[0-9]+$/ },
icon: { req: false, valid: /^false$/i },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang },
tempname: { req: false }
},
validate: function(attr)
@ -1234,8 +1314,8 @@ var Markup = {
attr:
{
unnamed: { req: true, valid: /^-?[0-9]+$/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang }
},
validate: function(attr)
{
@ -1656,8 +1736,8 @@ var Markup = {
attr:
{
unnamed: { req: true, valid: /^[0-9]+$/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang }
},
validate: function(attr)
{
@ -1697,8 +1777,8 @@ var Markup = {
attr:
{
unnamed: { req: true, valid: /^[0-9]+$/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang }
},
validate: function(attr)
{
@ -1820,8 +1900,8 @@ var Markup = {
{
unnamed: { req: true, valid: /^[0-9]+$/ },
icon: { req: false, valid: /^false$/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang }
},
validate: function(attr)
{
@ -1881,8 +1961,8 @@ var Markup = {
{
unnamed: { req: true, valid: /^[0-9]+$/ },
icon: { req: false, valid: /^false$/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang }
},
validate: function(attr)
{
@ -2045,8 +2125,8 @@ var Markup = {
unnamed: { req: true, valid: /^[0-9]+$/ },
gender: { req: false, valid: /^(0|1)$/ },
icon: { req: false, valid: /^false$/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang }
},
validate: function(attr)
{
@ -2263,8 +2343,8 @@ var Markup = {
{
unnamed: { req: true, valid: /^[0-9]+$/ },
icon: { req: false, valid: /^false$/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang }
},
validate: function(attr)
{
@ -2335,7 +2415,7 @@ var Markup = {
type: { req: false, valid: /\S+/ },
src2: { req: false, valid: /\S+/ },
type2: { req: false, valid: /\S+/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang }
},
validate: function (attr)
{
@ -2498,8 +2578,8 @@ var Markup = {
unnamed: { req: true, valid: /^[0-9]+$/ },
diff: { req: false, valid: /^[0-9]+$/ },
icon: { req: false, valid: /^false$/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang },
buff: { req: false, valid: /^true$/ },
tempname: { req: false }
},
@ -2563,8 +2643,8 @@ var Markup = {
{
unnamed: { req: true, valid: /^[0-9]+$/ },
icon: { req: false, valid: /^false$/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang }
},
validate: function(attr)
{
@ -3368,8 +3448,8 @@ var Markup = {
attr:
{
unnamed: { req: true, valid: /^[0-9]+$/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang }
},
validate: function(attr)
{
@ -3408,8 +3488,8 @@ var Markup = {
attr:
{
unnamed: { req: true, valid: /^[0-9]+$/ },
domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ },
site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }
domain: { req: false, valid: MarkupDomainRegexMap.lang },
site: { req: false, valid: MarkupDomainRegexMap.lang }
},
validate: function(attr)
{

View file

@ -2259,7 +2259,7 @@ $WH.g_createButton = function(text, href, opts)
href = 'javascript:;';
if (typeof opts['float'] != 'undefined' && !opts['float'])
styles.push('float:inherit');
styles.push('float:right');
if (typeof opts.style == 'string')
styles.push(opts.style);
@ -2267,7 +2267,7 @@ $WH.g_createButton = function(text, href, opts)
if (typeof opts.click == 'function' && !opts.disabled)
func = opts.click;
var btn = RedButton.create(text, !opts.disabled, func);
var btn = RedButton.create(text || '\0', !opts.disabled, func);
if (styles.length)
$(btn).attr('style', styles.join(';'));

View file

@ -403,6 +403,22 @@ var fi_filters = {
{ id: 20, name: 'teamcontrib5v5', type: 'num' }
],
icons: [
{ id: 9999, name: 'sepuses' },
{ id: 13, name: 'used', type: 'num' },
{ id: 1, name: 'items', type: 'num' },
{ id: 2, name: 'spells', type: 'num' },
{ id: 3, name: 'achievements', type: 'num' },
// { id: 4, name: 'battlepets', type: 'num' },
// { id: 5, name: 'battlepetabilities', type: 'num' },
{ id: 6, name: 'currencies', type: 'num' },
// { id: 7, name: 'garrisonabilities', type: 'num' },
// { id: 8, name: 'garrisonbuildings', type: 'num' },
{ id: 9, name: 'hunterpets', type: 'num' },
// { id: 10, name: 'garrisonmissionthreats', type: 'num' },
{ id: 11, name: 'classes', type: 'num' }
],
// custom
enchantments: [
{ id: 1, name: 'sepgeneral' },

View file

@ -4880,6 +4880,10 @@ function Listview(opt) {
this.createNote = this.template.createNote;
}
if (this.sortOptions == null && this.template.sortOptions != null) {
this.sortOptions = this.template.sortOptions;
}
if (this.customFilter == null && this.template.customFilter != null) {
this.customFilter = this.template.customFilter;
}
@ -5042,12 +5046,23 @@ function Listview(opt) {
});
}
for (var i = 0, len = this.columns.length; i < len; ++i) {
var col = this.columns[i];
if (visibleCols[col.id] != null || (!col.hidden && hiddenCols[col.id] == null)) {
this.visibility.push(i);
if ($.isArray(this.sortOptions)) {
for (var i = 0, len = this.sortOptions.length; i < len; ++i) {
var sortOpt = this.sortOptions[i];
if (visibleCols[sortOpt.id] != null || (!sortOpt.hidden && hiddenCols[sortOpt.id] == null)) {
this.visibility.push(i);
}
}
}
else {
for (var i = 0, len = this.columns.length; i < len; ++i) {
var col = this.columns[i];
if (visibleCols[col.id] != null || (!col.hidden && hiddenCols[col.id] == null)) {
this.visibility.push(i);
}
}
}
// ************************
// Sort
@ -5160,6 +5175,7 @@ Listview.MODE_CHECKBOX = 1;
Listview.MODE_DIV = 2;
Listview.MODE_TILED = 3;
Listview.MODE_CALENDAR = 4;
Listview.MODE_FLEXGRID = 5;
Listview.prototype = {
initialize: function() {
@ -5204,6 +5220,29 @@ Listview.prototype = {
this.mainContainer.className = 'listview-mode-div';
}
}
else if (this.mode == Listview.MODE_FLEXGRID) {
/* iconDB todo evaluate */
this.mainContainer = this.mainDiv = $WH.ce('div', { className: 'listview-mode-flexgrid' });
this.mainContainer.setAttribute('data-cell-min-width', this.template.cellMinWidth);
if (this.clickable)
this.mainContainer.className += ' clickable';
var layout = $('.layout');
var totalWidth = parseInt(layout.css('max-width')) - (parseInt(layout.css('padding-left')) || 0) - (parseInt(layout.css('padding-right')) || 0);
var slots = Math.floor(totalWidth / this.template.cellMinWidth);
var extraStyle = '.listview-mode-flexgrid[data-cell-min-width="' + this.template.cellMinWidth + '"] > div {min-width:' + this.template.cellMinWidth + "px;width:" + (100 / slots) + "%}";
while (slots--)
{
if (slots)
{
extraStyle += "\n@media screen and (max-width: " + (((slots + 1) * this.template.cellMinWidth) - 1 + 40) + "px) {";
extraStyle += '\n .listview-mode-flexgrid[data-cell-min-width="' + this.template.cellMinWidth + '"] > div {width:' + (100 / slots) + "%}";
extraStyle += "\n}"
}
}
$("<style/>").text(extraStyle).appendTo(document.head)
}
else {
this.mainContainer = this.table = $WH.ce('table');
this.thead = $WH.ce('thead');
@ -5229,6 +5268,9 @@ Listview.prototype = {
}
$WH.ae(this.mainContainer, colGroup);
if (this.sortOptions)
setTimeout((function() { this.updateSortArrow() }).bind(this), 0);
}
else {
if (!this.noStyle) {
@ -5339,6 +5381,51 @@ Listview.prototype = {
$WH.ae(this.thead, tr);
},
createSortOptions: function(parent) {
if (!$.isArray(this.sortOptions))
return;
var div = $WH.ce('div');
div.className = 'listview-sort-options';
div.innerHTML = LANG.lvnote_sort;
var sp = $WH.ce('span');
sp.className = 'listview-sort-options-choices';
var activeSort = null;
if ($.isArray(this.sort))
activeSort = this.sort[0];
var a;
var sorts = [];
for (var i = 0; i < this.sortOptions.length; i++)
{
if (this.sortOptions[i].hidden)
continue;
a = $WH.ce('a');
a.href = 'javascript:;';
a.innerHTML = this.sortOptions[i].name;
a.onclick = this.sortGallery.bind(this, a, i + 1);
if (activeSort === i + 1)
a.className = 'active';
sorts.push(a)
}
for (i = 0; i < sorts.length; i++)
$WH.ae(sp, sorts[i]);
$WH.ae(div, sp);
$WH.aef(parent, div);
},
sortGallery: function(el, colNo) {
var btn = $(el);
btn.siblings('a').removeClass('active');
btn.addClass('active');
this.sortBy(colNo);
},
createBands: function() {
var
bandTop = $WH.ce('div'),
@ -5370,6 +5457,8 @@ Listview.prototype = {
this.createNote(noteTop, noteBot);
}
this.createSortOptions(noteTop);
if (this.debug) {
$WH.ae(noteTop, $WH.ct(" ("));
var ids = $WH.ce('a');
@ -5608,7 +5697,20 @@ Listview.prototype = {
},
refreshRows: function() {
var target = (this.mode == Listview.MODE_DIV ? this.mainContainer : this.tbody);
var target = null;
switch (this.mode) {
case Listview.MODE_DIV:
target = this.mainContainer;
break;
case Listview.MODE_FLEXGRID:
target = this.mainDiv;
break;
default:
target = this.tbody
}
if (!target)
return;
$WH.ee(target);
if (this.nRowsVisible == 0) {
@ -5686,6 +5788,24 @@ Listview.prototype = {
$WH.ae(this.mainDiv, this.getDiv(i));
}
}
else if (this.mode == Listview.MODE_FLEXGRID) {
for (var j = 0; j < nItemsToDisplay; ++j) {
var
i = starti + j,
row = this.data[i];
if (!row) {
break;
}
if (row.__hidden || row.__deleted) {
++nItemsToDisplay;
continue;
}
$WH.ae(this.mainDiv, this.getDiv(i));
}
}
else if (this.mode == Listview.MODE_TILED) {
var
k = 0,
@ -6344,7 +6464,8 @@ Listview.prototype = {
},
sortBy: function(colNo) {
if (colNo <= 0 || colNo > this.columns.length) {
var sorts = this.sortOptions || this.columns;
if (colNo <= 0 || colNo > sorts.length) {
return;
}
@ -6353,7 +6474,7 @@ Listview.prototype = {
}
else {
var defaultSort = -1;
if (this.columns[colNo-1].type == 'text') {
if (sorts[colNo-1].type == 'text') {
defaultSort = 1;
}
@ -6373,6 +6494,7 @@ Listview.prototype = {
Listview.sort = this.sort;
Listview.columns = this.columns;
Listview.sortOptions = this.sortOptions;
if (this.indexCreated) {
this.data.sort(Listview.sortIndexedRows.bind(this));
@ -6425,10 +6547,11 @@ Listview.prototype = {
var sort = [];
var matches= _.match(/(\+|\-)[0-9]+/g);
if (matches != null) {
var sorts = this.sortOptions || this.columns;
for (var i = matches.length - 1; i >= 0; --i) {
var colNo = parseInt(matches[i]) | 0;
var _ = Math.abs(colNo);
if (_ <= 0 || _ > this.columns.length) {
if (_ <= 0 || _ > sorts.length) {
break;
}
this.addSort(sort, colNo);
@ -6509,7 +6632,7 @@ Listview.prototype = {
},
updateSortArrow: function() {
if (!this.sort.length || !this.thead || this.mode == Listview.MODE_TILED || this.mode == Listview.MODE_CALENDAR) {
if (!this.sort.length || !this.thead || this.mode == Listview.MODE_CALENDAR /* || this.searchSort */) {
return;
}
@ -6519,6 +6642,19 @@ Listview.prototype = {
return;
}
if (this.mode == Listview.MODE_TILED) {
if (!this.sortOptions)
return;
var a = $('.listview-sort-options a', this.noteTop).get(i);
if (this.lsa && this.lsa != a)
this.lsa.className = '';
a.className = this.sort[0] < 0 ? 'active sortdesc' : 'active sortasc';
this.lsa = a;
return;
}
if (this.mode == Listview.MODE_CHECKBOX && i < this.thead.firstChild.childNodes.length - 1) {
i += 1;
}
@ -6874,7 +7010,7 @@ Listview.sortRows = function(a, b) {
Listview.sortIndexedRows = function(a, b) {
var
sort = Listview.sort,
cols = Listview.columns,
cols = Listview.sortOptions || Listview.columns,
res;
for (var idx in sort) {
@ -11381,6 +11517,156 @@ Listview.templates = {
]
},
icongallery:
{
sort: [1],
mode: Listview.MODE_FLEXGRID,
clickable: false,
nItemsPerPage: 150,
cellMinWidth: 85,
poundable: 1,
sortOptions: [{
id: 'name',
name: LANG.name,
sortFunc: function(f, c) {
return $WH.stringCompare(f.name, c.name)
}
}],
columns: [],
value: 'name',
compute: function(_icon, td, tr) {
var cell = $WH.ce('div');
cell.className = 'icon-cell';
$(cell).mouseenter(function() {
setTimeout((function() { this.className += ' animate'; }).bind(this), 1);
}).mouseleave(function() {
this.className = this.className.replace(/ *animate\b/, '');
});
$WH.ae(cell, Icon.create(_icon.icon, 2, null, this.getItemLink(_icon)));
var overlay = $WH.ce('div', { className: 'icon-cell-overlay' });
$(overlay).mouseleave(function() {
$('.fa-check', this).removeClass('fa-check').addClass('fa-clipboard');
});
$WH.ae(overlay, Icon.create(_icon.icon, 2, null, this.getItemLink(_icon)));
var ovlName = $WH.ce('div', { className: 'icon-cell-overlay-name' });
var o = function()
{
this.focus();
this.select();
};
$WH.ae(ovlName, $WH.ce('input', {
type: 'text',
value: _icon.name,
onclick: o,
onfocus: o
}));
/* Aowow - we do not use FA
$WH.ae(ovlName, $WH.g_createButton(null, null, {
'class': 'fa fa-fw fa-clipboard',
'float': false,
'no-margin': true,
click: function() {
var v = $(this);
var y = v.siblings('input[type="text"]');
y.focus().select();
var w = false;
try
{
if (!document.execCommand('copy'))
w = true;
}
catch (u) { w = true; }
y.blur();
if (w)
{
v.css({ 'pointer-events': 'none' })
.removeClass('fa-clipboard')
.addClass('fa-exclamation-triangle')
.blur()
.effect('shake', { distance: 5 });
setTimeout(function() { $('.icon-cell-overlay-name .btn').fadeOut(1000) }, 600);
}
else
v.removeClass('fa-clipboard').addClass('fa-check');
}
}));
*/
$WH.ae(ovlName, $WH.ce('input', {
type: 'button',
className: 'button-copy',
onclick: function() {
var btn = $(this);
var iName = btn.siblings('input[type="text"]');
iName.focus().select();
var error = false;
try
{
if (!document.execCommand('copy'))
error = true;
}
catch (x) { error = true; }
iName.blur();
if (error)
{
btn.css({
'pointer-events': 'none',
'background-image': 'url(' + g_staticUrl + '/images/icons/report.png)'
}).blur();
setTimeout(function() { $('.icon-cell-overlay-name .button-copy').fadeOut(1000) }, 600);
}
else
btn.css('background-image', 'url(' + g_staticUrl + '/images/icons/tick.png)');
}
}));
/* end replacement */
$WH.ae(overlay, ovlName);
var t = $WH.ce('div', { className: 'icon-cell-overlay-counts' });
var types = [3, 6, 10, 17, 9, 13];
var c = 0;
for (var h = 0, m; m = types[h]; h++) {
var p = g_types[m] + 'count';
if (_icon[p]) {
c += _icon[p];
var g = g_types[m];
var s = _icon[p] == 1 ? LANG.types[m][1] : LANG.types[m][3];
$WH.ae(t, $WH.ce('div', null, $WH.ce('a', {
href: this.getItemLink(_icon) + '#used-by-' + g,
innerHTML: $WH.sprintf(LANG.entitycount, _icon[p], s)
})))
}
}
if (!c)
$WH.ae(t, $WH.ce('div', { innerHTML: LANG.unused }));
$WH.ae(overlay, t);
var k = $WH.ce('div', { className: 'icon-cell-overlay-placer' }, overlay);
$WH.ae(cell, k);
$WH.ae(td, cell);
},
sortFunc: function(a, b) {
return $WH.stringCompare(a.name, b.name);
},
getItemLink: function(icon) {
return "?icon=" + icon.id;
}
},
topusers:
{
sort: ['reputation'],
@ -20873,6 +21159,10 @@ var Links = new function() {
item: 1
};
var extraTypes = {
29: 'icondb'
};
this.onShow = function() {
if (location.hash && location.hash != '#links') {
oldHash = location.hash;
@ -20934,7 +21224,7 @@ var Links = new function() {
'wowheadurl': g_host +'?' + type + '=' + opt.typeId,
'armoryurl': 'http://us.battle.net/wow/en/' + type + '/' + opt.typeId,
'ingamelink': link,
'markuptag': '[' + type + '=' + opt.typeId + ']'
'markuptag': '[' + (extraTypes[opt.type] || type) + '=' + opt.typeId + ']'
};
dialog.show('links', {
@ -21403,8 +21693,9 @@ AudioControls = function () {
function createButton(text, disabled) {
return $WH.g_createButton(text, null, {
disabled: disabled,
'float': false,
style: 'margin:0 12px; display:inline-block'
// 'float': false, Aowow - adapted style
// style: 'margin:0 12px; display:inline-block'
style: 'margin:0 12px; display:inline-block; float:inherit; '
});
}
};
@ -22085,6 +22376,7 @@ var
g_skills = {},
g_gatheredcurrencies = {},
g_sounds = {},
g_icons = {},
g_enchantments = {},
g_emotes = {};
@ -22106,6 +22398,7 @@ var g_types = {
15: 'skill',
17: 'currency',
19: 'sound',
29: 'icon',
501: 'emote',
502: 'enchantment'
};

View file

@ -812,6 +812,20 @@ var mn_sounds = [
[50,"Zone Ambience","?sounds&filter=ty=50"],
[28,"Zone Music","?sounds&filter=ty=28"]
];
mn_icons = [
[3, "Erfolge", "?icons&filter=cr=3;crs=1;crv=0"],
// [4, "Kampfhaustiere", "?icons&filter=cr=4;crs=1;crv=0"],
// [5, "Kampfhaustier-Fähigkeiten", "?icons&filter=cr=5;crs=1;crv=0"],
[11, "Klassen", "?icons&filter=cr=11;crs=1;crv=0"],
[6, "Währungen", "?icons&filter=cr=6;crs=1;crv=0"],
// [7, "Garnisonsfähigkeiten", "?icons&filter=cr=7;crs=1;crv=0"],
// [8, "Garnisonsgebäude", "?icons&filter=cr=8;crs=1;crv=0"],
[1, "Gegenstände", "?icons&filter=cr=1;crs=1;crv=0"],
[9, "Begleiter", "?icons&filter=cr=9;crs=1;crv=0"],
[2, "Zauber", "?icons&filter=cr=2;crs=1;crv=0"],
// [10, "Bedrohungen", "?icons&filter=cr=10;crs=1;crv=0"],
[13, "Ungenutzt", "?icons&filter=cr=13;crs=3;crv=0"]
];
var mn_talentCalc = [
[6,"Todesritter","?talent#j",,{className:"c6",tinyIcon:"class_deathknight"}],
[11,"Druide","?talent#0",,{className:"c11",tinyIcon:"class_druid"}],
@ -862,25 +876,30 @@ var mn_petCalc = [
[42,"Wurm","?petcalc#mm",,{tinyIcon:"Ability_Hunter_Pet_Worm"}]
];
var mn_database = [
[, "Gegenstände"],
[2,"Ausrüstungssets","?itemsets",mn_itemSets],
[0,"Gegenstände","?items",mn_items],
[101,"Verzauberungen","?enchantments",mn_enchantments],
[, "Charakter"],
[14,"Berufe & Fertigkeiten","?skills",mn_skills],
[8,"Begleiter","?pets",mn_pets],
[9,"Erfolge","?achievements",mn_achievements],
[12,"Klassen","?classes",mn_classes],
[10,"Titel","?titles",mn_titles],
[13,"Völker","?races",mn_races],
[1,"Zauber","?spells",mn_spells],
[100,"Emotes","?emotes",null],
[, "Welt"],
[7,"Fraktionen","?factions",mn_factions],
[6,"Gebiete","?zones",mn_zones],
[0,"Gegenstände","?items",mn_items],
[12,"Klassen","?classes",mn_classes],
[19,"Klänge","?sounds",mn_sounds],
[4,"NPCs","?npcs",mn_npcs],
[5,"Objekte","?objects",mn_objects],
[3,"Quests","?quests",mn_quests],
[10,"Titel","?titles",mn_titles],
[13,"Völker","?races",mn_races],
[15,"Währungen","?currencies",mn_currencies],
[11,"Weltereignisse","?events",mn_holidays],
[1,"Zauber","?spells",mn_spells],
[100,"Emotes","?emotes",null],
[101,"Verzauberungen","?enchantments",mn_enchantments]
[, "Anderes"],
[19,"Klänge","?sounds",mn_sounds],
[31, "Icons", "?icons", mn_icons]
];
var mn_tools = [
[0,"Talentrechner","?talent",mn_talentCalc],
@ -2427,6 +2446,7 @@ var LANG = {
diet: "Ernährung",
dps: "DPS",
earned: "Errungen",
entitycount: "$1 $2",
enchant: "Verzaubern",
exp: "Erf.",
faction: "Fraktion",
@ -2520,6 +2540,7 @@ var LANG = {
tp: "TP",
trending: "Aktuell",
type: "Art",
unused: "Ungenutzt",
up: "Hoch",
cooldown: "Abklingzeit",
duration: "Dauer",
@ -2653,11 +2674,14 @@ var LANG = {
lvnodata_vi2: "Ihr könntet der Erste sein, der für diese Seite ein <a>Video</a> vorschlägt!",
lvnodata_vi3: "Bitte <a>meldet Euch an</a> um ein Video vorzuschlagen, oder <a>registriert Euch</a> falls Ihr noch nicht über einen Account verfügt.",
lvnote_sort: "Sortieren nach: ",
lvnote_tryfiltering: "Versucht es mit <a>gefilterten</a> Suchergebnissen.",
lvnote_trynarrowing: "Versucht, Eure Suche weiter einzugrenzen",
lvnote_upgradesfor: 'Sucht nach Verbesserungen für <a href="?item=$1" class="q$2"><b>$3</b></a>.',
lvnote_witherrors: "Einige Filter in Eurer Suche waren nicht gültig und wurden ignoriert.",
lvnote_entitiesfound: "$1 $2 gefunden ($3 angezeigt)",
lvnote_itemsfound: "$1 Gegenstände gefunden ($2 angezeigt)",
lvnote_itemsetsfound: "$1 Sets gefunden ($2 angezeigt)",
lvnote_npcsfound: "$1 NPCs gefunden ($2 angezeigt)",
@ -3276,6 +3300,7 @@ var LANG = {
16: ["Statistik", "Statistik", "Statistiken", "Statistiken"],
17: ["Währung", "Währung", "Währungen", "Währungen"],
19: ["Klang", "Klang", "Klänge", "Klänge"],
29: ["Icon", "Icon", "Icons", "Icons"],
501: ["Emote", "Emote", "Emotes", "Emotes"],
502: ["Verzauberung", "Verzauberung", "Verzauberungen", "Verzauberungen"]
},
@ -3951,6 +3976,23 @@ var LANG = {
teamcontrib5v5: "5v5 Arena-Teambeteiligung"
},
fiicons: { // derived from from LANG.filters_icons
sepgeneral: "Allgemein",
sepuses: "Verwendungen",
used: "Anzahl Verwendungen",
items: "Genutzt von Gegenstände",
spells: "Genutzt von Zauber",
achievements: "Genutzt von Erfolge",
// battlepets: "Genutzt von Kampfhaustiere",
// battlepetabilities: "Genutzt von Kampfhaustier-Fähigkeiten",
currencies: "Genutzt von Währungen",
// missionabilities: "Genutzt von Missionsfähigkeiten",
// garrisonbuildings: "Genutzt von Garnisonsgebäude",
hunterpets: "Genutzt von Begleiter",
// threats: "Genutzt von Bedrohungen",
classes: "Genutzt von Klassen"
},
// custom
fienchantments: {
id: "ID",

View file

@ -858,6 +858,20 @@ var mn_sounds = [
[50,"Zone Ambience","?sounds&filter=ty=50"],
[28,"Zone Music","?sounds&filter=ty=28"]
];
mn_icons = [
[3, "Achievements", "?icons&filter=cr=3;crs=1;crv=0"],
// [4, "Battle Pets", "?icons&filter=cr=4;crs=1;crv=0"],
// [5, "Battle Pet Abilities", "?icons&filter=cr=5;crs=1;crv=0"],
[11, "Classes", "?icons&filter=cr=11;crs=1;crv=0"],
[6, "Currencies", "?icons&filter=cr=6;crs=1;crv=0"],
// [7, "Garrison Abilities", "?icons&filter=cr=7;crs=1;crv=0"],
// [8, "Garrison Buildings", "?icons&filter=cr=8;crs=1;crv=0"],
[1, "Items", "?icons&filter=cr=1;crs=1;crv=0"],
[9, "Hunter Pets", "?icons&filter=cr=9;crs=1;crv=0"],
[2, "Spells", "?icons&filter=cr=2;crs=1;crv=0"],
// [10, "Threats", "?icons&filter=cr=10;crs=1;crv=0"],
[13, "Unused", "?icons&filter=cr=13;crs=3;crv=0"]
];
var mn_talentCalc = [
[6,"Death Knight","?talent#j",,{className:"c6",tinyIcon:"class_deathknight"}],
[11,"Druid","?talent#0",,{className:"c11",tinyIcon:"class_druid"}],
@ -908,25 +922,30 @@ var mn_petCalc = [
[42,"Worm","?petcalc#mm",,{tinyIcon:"Ability_Hunter_Pet_Worm"}]
];
var mn_database = [
[9,"Achievements","?achievements",mn_achievements],
[12,"Classes","?classes",mn_classes],
[15,"Currencies","?currencies",mn_currencies],
[7,"Factions","?factions",mn_factions],
[, "Items"],
[0,"Items","?items",mn_items],
[2,"Item Sets","?itemsets",mn_itemSets],
[4,"NPCs","?npcs",mn_npcs],
[5,"Objects","?objects",mn_objects],
[101,"Enchantments","?enchantments",mn_enchantments],
[, "Character"],
[9,"Achievements","?achievements",mn_achievements],
[12,"Classes","?classes",mn_classes],
[100,"Emotes","?emotes",null],
[8,"Hunter Pets","?pets",mn_pets],
[14,"Professions & Skills","?skills",mn_skills],
[3,"Quests","?quests",mn_quests],
[13,"Races","?races",mn_races],
[19,"Sounds","?sounds",mn_sounds],
[1,"Spells","?spells",mn_spells],
[10,"Titles","?titles",mn_titles],
[, "World"],
[15,"Currencies","?currencies",mn_currencies],
[7,"Factions","?factions",mn_factions],
[4,"NPCs","?npcs",mn_npcs],
[5,"Objects","?objects",mn_objects],
[3,"Quests","?quests",mn_quests],
[11,"World Events","?events",mn_holidays],
[6,"Zones","?zones",mn_zones],
[100,"Emotes","?emotes",null],
[101,"Enchantments","?enchantments",mn_enchantments]
[, "Other"],
[31, "Icons", "?icons", mn_icons],
[19,"Sounds","?sounds",mn_sounds]
];
var mn_tools = [
[0,"Talent Calculator","?talent",mn_talentCalc],
@ -2475,6 +2494,7 @@ var LANG = {
dps: "DPS",
earned: "Earned",
enchant: "Enchant",
entitycount: "$1 $2",
exp: "Exp.",
faction: "Faction",
gains: "Gains",
@ -2568,6 +2588,7 @@ var LANG = {
tp: "TP",
trending: "Trending",
type: "Type",
unused: "Unused",
up: "Up",
cooldown: "Cooldown",
duration: "Duration",
@ -2701,11 +2722,14 @@ var LANG = {
lvnodata_vi2: "Be the first to <a>suggest a video</a> for this page!",
lvnodata_vi3: "Please <a>sign in</a> to suggest a video, or <a>sign up</a> if you don't already have an account.",
lvnote_sort: "Sort by: ",
lvnote_tryfiltering: "Try <a>filtering</a> your results",
lvnote_trynarrowing: "Try narrowing your search",
lvnote_upgradesfor: 'Finding upgrades for <a href="?item=$1" class="q$2"><b>$3</b></a>.',
lvnote_witherrors: "Some filters in your search were invalid and have been ignored.",
lvnote_entitiesfound: "$1 $2 found ($3 displayed)",
lvnote_itemsfound: "$1 items found ($2 displayed)",
lvnote_itemsetsfound: "$1 item sets found ($2 displayed)",
lvnote_npcsfound: "$1 NPCs found ($2 displayed)",
@ -3324,6 +3348,7 @@ var LANG = {
16: ["Statistic", "statistic", "Statistics", "statistics"],
17: ["Currency", "currency", "Currencies", "currencies"],
19: ["Sound", "sound", "Sounds", "sounds"],
29: ["Icon", "icon", "Icons", "icons"],
501: ["Emote", "emote", "Emotes", "emotes"],
502: ["Enchantment", "enchantment", "Enchantments", "enchantments"]
},
@ -3998,6 +4023,23 @@ var LANG = {
teamcontrib5v5: "5v5 arena team contribution"
},
fiicons: { // derived from from LANG.filters_icons
sepgeneral: "General",
sepuses: "Uses",
used: "Times Used",
items: "Used by Items",
spells: "Used by Spells",
achievements: "Used by Achievements",
// battlepets: "Used by Battle Pets",
// battlepetabilities: "Used by Battle Pet Abilities",
currencies: "Used by Currencies",
// missionabilities: "Used by Mission Abilities",
// garrisonbuildings: "Used by Garrison Buildings",
hunterpets: "Used by Hunter Pets",
// threats: "Used by Threats",
classes: "Used by Classes"
},
// custom
fienchantments: {
id: "ID",

View file

@ -812,6 +812,20 @@ var mn_sounds = [
[50,"Zone Ambience","?sounds&filter=ty=50"],
[28,"Zone Music","?sounds&filter=ty=28"]
];
mn_icons = [
[3, "Logros", "?icons&filter=cr=3;crs=1;crv=0"],
// [4, "Mascotas de duelo", "?icons&filter=cr=4;crs=1;crv=0"],
// [5, "Habilidades de mascota de batalla", "?icons&filter=cr=5;crs=1;crv=0"],
[11, "Clases", "?icons&filter=cr=11;crs=1;crv=0"],
[6, "Monedas", "?icons&filter=cr=6;crs=1;crv=0"],
// [8, "Construcciones de Ciudadela", "/icons?filter=cr=8;crs=1;crv=0"],
[1, "Objetos", "?icons&filter=cr=1;crs=1;crv=0"],
[9, "Mascotas de cazador", "?icons&filter=cr=9;crs=1;crv=0"],
// [7, "Habilidades del cuartel", "?icons&filter=cr=7;crs=1;crv=0"],
[2, "Hechizos", "?icons&filter=cr=2;crs=1;crv=0"],
// [10, "Amenazas", "?icons&filter=cr=10;crs=1;crv=0"],
[13, "Sin uso", "?icons&filter=cr=13;crs=3;crv=0"]
];
var mn_talentCalc = [
[6,"Caballero de la muerte","?talent#j",,{className:"c6",tinyIcon:"class_deathknight"}],
[11,"Druida","?talent#0",,{className:"c11",tinyIcon:"class_druid"}],
@ -862,25 +876,30 @@ var mn_petCalc = [
[42,"Gusano","?petcalc#mm",,{tinyIcon:"Ability_Hunter_Pet_Worm"}]
];
var mn_database = [
[9,"Logros","?achievements",mn_achievements],
[12,"Clases","?classes",mn_classes],
[15,"Monedas","?currencies", mn_currencies],
[7,"Facciones","?factions",mn_factions],
[8,"Mascotas de cazador","?pets",mn_pets],
[, "Objetos"],
[2,"Conjuntos de objetos","?itemsets",mn_itemSets],
[0,"Objetos","?items",mn_items],
[4,"PNJs","?npcs",mn_npcs],
[5,"Entidades","?objects",mn_objects],
[101,"Encantamientos","?enchantments",mn_enchantments],
[, "Personaje"],
[9,"Logros","?achievements",mn_achievements],
[12,"Clases","?classes",mn_classes],
[100,"Emociones","?emotes",null],
[8,"Mascotas de cazador","?pets",mn_pets],
[14,"Profesiones y habilidades","?skills",mn_skills],
[3,"Misiones","?quests",mn_quests],
[13,"Razas","?races",mn_races],
[1,"Hechizos","?spells",mn_spells],
[19,"Sonidos","?sounds",mn_sounds],
[10,"Títulos","?titles",mn_titles],
[, "Mundo"],
[15,"Monedas","?currencies", mn_currencies],
[7,"Facciones","?factions",mn_factions],
[4,"PNJs","?npcs",mn_npcs],
[5,"Entidades","?objects",mn_objects],
[3,"Misiones","?quests",mn_quests],
[11,"Eventos del mundo","?events",mn_holidays],
[6,"Zonas","?zones",mn_zones],
[100,"Emociones","?emotes",null],
[101,"Encantamientos","?enchantments",mn_enchantments]
[, "Otros"],
[31, "Iconos", "?icons", mn_icons],
[19,"Sonidos","?sounds",mn_sounds]
];
var mn_tools = [
[0,"Calculadora de talentos","?talent",mn_talentCalc],
@ -2429,6 +2448,7 @@ var LANG = {
dps: "DPS",
earned: "Logrados",
enchant: "Encantar",
entitycount: "$1 $2",
exp: "Exp.",
faction: "Facción",
gains: "Ganancias",
@ -2521,6 +2541,7 @@ var LANG = {
tp: "PI",
trending: "Tendencia",
type: "Tipo",
unused: "Sin uso",
up: "Arriba",
cooldown: "Reutilización",
duration: "Duración",
@ -2654,11 +2675,14 @@ var LANG = {
lvnodata_vi2: "¡Sé el primero en <a>sugerir un vídeo</a> para esta página!",
lvnodata_vi3: "Por favor <a>inicia sesión</a> para sugerir un vídeo, o <a>crea tu cuenta</a> si aun no tienes una.",
lvnote_sort: "Ordenar por: ",
lvnote_tryfiltering: "Trata de <a>filtrar</a> tus resultados",
lvnote_trynarrowing: "Trata de ser más específica(o) en tu búsqueda",
lvnote_upgradesfor: 'Buscando mejoras para <a href="?item=$1" class="q$2"><b>$3</b></a>.',
lvnote_witherrors: "Algunos filtros en tus búsquedas eran inválidos y han sido ignorados.",
lvnote_entitiesfound: "Se encontraron $1 $2 (se muestran $3)",
lvnote_itemsfound: "$1 objetos encontrados (mostrando $2)",
lvnote_itemsetsfound: "$1 conjuntos de objetos encontrados (mostrando $2)",
lvnote_npcsfound: "$1 PNJs encontrados (mostrando $2)",
@ -3277,6 +3301,7 @@ var LANG = {
16: ["Atributo", "atributo", "Atributos", "atributos"],
17: ["Monedas", "monedas", "Monedas", "monedas"],
19: ["Sonido", "sonido", "Sonidos", "sonidos"],
29: ["Icono", "icono", "Iconos", "íconos"],
501: ["Emoción", "emoción", "Emociones", "emociones"],
502: ["Encantamiento", "encantamiento", "Encantamientos", "encantamientos"]
},
@ -3954,6 +3979,23 @@ var LANG = {
teamcontrib5v5: "Contribución de equipo de arena 5v5"
},
fiicons: { // derived from from LANG.filters_icons
sepgeneral: "General",
sepuses: "Usos",
used: "Veces Usado",
items: "Usado(a) por Objetos",
spells: "Usado(a) por Hechizos",
achievements: "Usado(a) por Logros",
// battlepets: "Usado(a) por Mascotas de duelo",
// battlepetabilities: "Usado(a) por Habilidades de mascota(s) de duelo",
currencies: "Usado(a) por Monedas",
// missionabilities: "Usado(a) por Aptitudes de misión",
// garrisonbuildings: "Usado(a) por Construcciones de Ciudadela",
hunterpets: "Usado(a) por Mascotas de cazador",
// threats: "Usado(a) por Amenazas",
classes: "Usado(a) por Clases"
},
// custom
fienchantments: {
id: "ID",

View file

@ -812,6 +812,20 @@ var mn_sounds = [
[50,"Zone Ambience","?sounds&filter=ty=50"],
[28,"Zone Music","?sounds&filter=ty=28"]
];
mn_icons = [
[3, "Hauts faits", "?icons&filter=cr=3;crs=1;crv=0"],
// [4, "Mascottes de combat", "?icons&filter=cr=4;crs=1;crv=0"],
// [5, "Capacités de Familiers en Combat", "?icons&filter=cr=5;crs=1;crv=0"],
[11, "Classes", "?icons&filter=cr=11;crs=1;crv=0"],
[6, "Monnaies", "?icons&filter=cr=6;crs=1;crv=0"],
// [7, "Compétences de fief", "?icons&filter=cr=7;crs=1;crv=0"],
// [8, "Bâtiments de fief", "?icons&filter=cr=8;crs=1;crv=0"],
[1, "Objets", "?icons&filter=cr=1;crs=1;crv=0"],
[9, "Familiers de chasseur", "?icons&filter=cr=9;crs=1;crv=0"],
[2, "Sorts", "?icons&filter=cr=2;crs=1;crv=0"],
// [10, "Menaces", "?icons&filter=cr=10;crs=1;crv=0"],
[13, "Inutilisé", "?icons&filter=cr=13;crs=3;crv=0"]
];
var mn_talentCalc = [
[6,"Chevalier de la mort","?talent#j",,{className:"c6",tinyIcon:"class_deathknight"}],
[11,"Druide","?talent#0",,{className:"c11",tinyIcon:"class_druid"}],
@ -862,25 +876,30 @@ var mn_petCalc = [
[42,"Ver","?petcalc#mm",,{tinyIcon:"Ability_Hunter_Pet_Worm"}]
];
var mn_database = [
[9,"Hauts faits","?achievements",mn_achievements],
[12,"Classes","?classes",mn_classes],
[15,"Monnaies","?currencies", mn_currencies],
[7,"Factions","?factions",mn_factions],
[8,"Familiers de chasseur","?pets",mn_pets],
[, "Objets"],
[2,"Ensembles d'objets","?itemsets",mn_itemSets],
[0,"Objets","?items",mn_items],
[4,"PNJs","?npcs",mn_npcs],
[5,"Entités","?objects",mn_objects],
[101,"Enchantements","?enchantments",mn_enchantments],
[, "Personnage"],
[9,"Hauts faits","?achievements",mn_achievements],
[12,"Classes","?classes",mn_classes],
[8,"Familiers de chasseur","?pets",mn_pets],
[14,"Métiers & compétences","?skills",mn_skills],
[3,"Quêtes","?quests",mn_quests],
[13,"Races","?races",mn_races],
[19,"Sons","?sounds", mn_sounds],
[1,"Sorts","?spells",mn_spells],
[10,"Titres","?titles",mn_titles],
[100,"Emotes","?emotes",null],
[, "Monde"],
[15,"Monnaies","?currencies", mn_currencies],
[7,"Factions","?factions",mn_factions],
[4,"PNJs","?npcs",mn_npcs],
[5,"Entités","?objects",mn_objects],
[3,"Quêtes","?quests",mn_quests],
[11,"Évènements mondiaux","?events",mn_holidays],
[6,"Zones","?zones",mn_zones],
[100,"Emotes","?emotes",null],
[101,"Enchantements","?enchantments",mn_enchantments]
[, "Autre"],
[31, "Icônes", ":wowhead.com/icons", mn_icons],
[19,"Sons","?sounds", mn_sounds]
];
var mn_tools = [
[0,"Calculateur de talents","?talent",mn_talentCalc],
@ -2418,6 +2437,7 @@ var LANG = {
dps: "DPS",
earned: "Accomplis",
enchant: "Enchanter",
entitycount: "$1 $2",
exp: "Exp.",
faction: "Faction",
gains: "Gains",
@ -2511,6 +2531,7 @@ var LANG = {
tp: "PE",
trending: "Tendance",
type: "Type",
unused: "Inutilisé",
up: "Vers le haut",
cooldown: "Recharge",
duration: "Durée",
@ -2644,11 +2665,14 @@ var LANG = {
lvnodata_vi2: "Soyez le premier <a>suggérer un vidéo</a> pour cette page!",
lvnodata_vi3: "Veuillez vous <a>connecter</a> pour suggérer un vidéo ou <a>enregistrez vous</a> si vous n'avez pas de compte.",
lvnote_sort: "Trier par : ",
lvnote_tryfiltering: "Essayez de <a>filtrer</a> vos résultats",
lvnote_trynarrowing: "Essayez de restreindre votre recherche",
lvnote_upgradesfor: 'En train de trouver des améliorations pour <a href="?item=$1" class="q$2"><b>$3</b></a>.',
lvnote_witherrors: "Certains filtres dans votre recherche étaient invalides et on été ignorés.",
lvnote_entitiesfound: "$1 $2 trouvés ($3 affichés)",
lvnote_itemsfound: "$1 objets trouvés ($2 affichés)",
lvnote_itemsetsfound: "$1 ensembles d'objets trouvés ($2 affichés)",
lvnote_npcsfound: "$1 PNJs trouvés ($2 affichés)",
@ -3267,6 +3291,7 @@ var LANG = {
16: ["Statistique", "statistique", "Statistiques", "statistiques"],
17: ["Monnaies", "monnaie", "Monnaies", "monnaies"],
19: ["Son", "Son", "Sons", "Sons"],
29: ["Icône", "icône", "Icônes", "icônes"],
501: ["Emote", "emote", "Emotes", "emotes"],
502: ["Enchantement", "enchantement", "Enchantements", "enchantements"]
},
@ -3943,6 +3968,23 @@ var LANG = {
teamcontrib5v5: "Contribution d'un équipe d'aréna 5v5"
},
fiicons: { // derived from from LANG.filters_icons
sepgeneral: "Général",
sepuses: "Usages",
used: "Nombre d'utilisations",
items: "Utilisé par des Objets",
spells: "Utilisé par des Sorts",
achievements: "Utilisé par des Hauts faits",
// battlepets: "Utilisé par des Mascottes de combat",
// battlepetabilities: "Utilisé par des Capacités de Familiers en Combat",
currencies: "Utilisé par des Monnaies",
// missionabilities: "Utilisé par des Capacités de la mission",
// garrisonbuildings: "Utilisé par des Bâtiments de fief",
hunterpets: "Utilisé par des Familiers de chasseur",
// threats: "Utilisé par des Menaces",
classes: "Utilisé par des Classes"
},
// custom
fienchantments: {
id: "ID",

View file

@ -812,6 +812,20 @@ var mn_sounds = [
[50,"Zone Ambience","?sounds&filter=ty=50"],
[28,"Zone Music","?sounds&filter=ty=28"]
];
mn_icons = [
[3, "Достижения", "?icons&filter=cr=3;crs=1;crv=0"],
// [4, "Боевые питомцы", "?icons&filter=cr=4;crs=1;crv=0"],
// [5, "Способности Боевого Питомца", "?icons&filter=cr=5;crs=1;crv=0"],
[11, "Классы", "?icons&filter=cr=11;crs=1;crv=0"],
[6, "Валюта", "?icons&filter=cr=6;crs=1;crv=0"],
// [7, "Способности Гарнизона", "?icons&filter=cr=7;crs=1;crv=0"],
// [8, "Здания гарнизона", "?icons&filter=cr=8;crs=1;crv=0"],
[1, "Предметы", "?icons&filter=cr=1;crs=1;crv=0"],
[9, "Питомцы охотников", "?icons&filter=cr=9;crs=1;crv=0"],
[2, "Заклинания", "?icons&filter=cr=2;crs=1;crv=0"],
// [10, "Угрозы", "?icons&filter=cr=10;crs=1;crv=0"],
[13, "Неиспользуемые", "?icons&filter=cr=13;crs=3;crv=0"]
];
var mn_talentCalc = [
[6,"Рыцарь смерти","?talent#j",,{className:"c6",tinyIcon:"class_deathknight"}],
[11,"Друид","?talent#0",,{className:"c11",tinyIcon:"class_druid"}],
@ -862,25 +876,30 @@ var mn_petCalc = [
[42,"Червь","?petcalc#mm",,{tinyIcon:"Ability_Hunter_Pet_Worm"}]
];
var mn_database = [
[9,"Достижения","?achievements",mn_achievements],
[12,"Классы","?classes",mn_classes],
[15,"Валюта","?currencies", mn_currencies],
[7,"Фракции","?factions",mn_factions],
[8,"Питомцы охотников","?pets",mn_pets],
[, "Предметы"],
[2,"Комплекты","?itemsets",mn_itemSets],
[0,"Предметы","?items",mn_items],
[4,"НИП","?npcs",mn_npcs],
[5,"Объекты","?objects",mn_objects],
[101,"Улучшения","?enchantments",mn_enchantments],
[, "Персонаж"],
[9,"Достижения","?achievements",mn_achievements],
[12,"Классы","?classes",mn_classes],
[8,"Питомцы охотников","?pets",mn_pets],
[14,"Профессии и навыки","?skills",mn_skills],
[3,"Задания","?quests",mn_quests],
[13,"Расы","?races",mn_races],
[1,"Заклинания","?spells",mn_spells],
[10,"Звания","?titles",mn_titles],
[100,"Эмоции","?emotes",null],
[, "Игровой мир"],
[15,"Валюта","?currencies", mn_currencies],
[7,"Фракции","?factions",mn_factions],
[4,"НИП","?npcs",mn_npcs],
[5,"Объекты","?objects",mn_objects],
[3,"Задания","?quests",mn_quests],
[11,"Игровые события","?events",mn_holidays],
[6,"Местности","?zones",mn_zones],
[19,"Звуки","?sounds",mn_sounds],
[100,"Эмоции","?emotes",null],
[101,"Улучшения","?enchantments",mn_enchantments]
[, "Другое"],
[31, "Иконки", ":wowhead.com/icons", mn_icons],
[19,"Звуки","?sounds",mn_sounds]
];
var mn_tools = [
[0,"Расчёт талантов","?talent",mn_talentCalc],
@ -2418,6 +2437,7 @@ var LANG = {
dps: "УВС",
earned: "Заработано",
enchant: "Чары",
entitycount: "$2: $1",
exp: "Опыт",
faction: "Фракция",
gains: "Бонус",
@ -2511,6 +2531,7 @@ var LANG = {
tp: "Очков",
trending: "Актуальное",
type: "Тип",
unused: "Неиспользуемые",
up: "Выше",
cooldown: "Восстановление",
duration: "Длительность",
@ -2644,11 +2665,14 @@ var LANG = {
lvnodata_vi2: "<a>Будьте первым</a>, кто предложит видео к этой странице!",
lvnodata_vi3: "<a>Войдите</a>, чтобы предложить видео, или <a>зарегистрируйтесь</a>, если у вас еще нет учетной записи.",
lvnote_sort: "Сортировать: ",
lvnote_tryfiltering: "Попробуйте <a>отфильтровать</a> результаты",
lvnote_trynarrowing: "Попытайтесь сузить поиск",
lvnote_upgradesfor: 'Предметы лучше, чем <a href="?item=$1" class="q$2"><b>$3</b></a>.',
lvnote_witherrors: "Некоторые фильтры в вашем поиске некорректны и были проигнорированы.",
lvnote_entitiesfound: "Найдено $2: $1 (показано: $3)",
lvnote_itemsfound: "Найдено предметов: $1 (показано: $2)",
lvnote_itemsetsfound: "Найдено комплектов: $1 (показано: $2)",
lvnote_npcsfound: "Найдено НИП: $1 (показано: $2)",
@ -3267,6 +3291,7 @@ var LANG = {
16: ["Статистика", "характеристика", "Характеристики", "характеристики"],
17: ["Валюта", "валюта", "Валюта", "валюта"],
19: ["Звук", "звук", "Звуки", "звуки"],
29: ["Иконка", "иконка", "Иконки", "иконки"],
501: ["Эмоция", "эмоция", "Эмоции", "эмоции"],
502: ["Улучшение", "улучшение", "Улучшения", "улучшения"]
},
@ -3944,6 +3969,23 @@ var LANG = {
teamcontrib5v5: "Очки команды арены 5х5"
},
fiicons: { // derived from from LANG.filters_icons
sepgeneral: "Общее",
sepuses: "Используется",
used: "Использовано (раз)",
items: "Используется Предметы",
spells: "Используется Заклинания",
achievements: "Используется Достижения",
battlepets: "Используется Боевые питомцы",
battlepetabilities: "Используется Способности Боевого Питомца",
currencies: "Используется Валюта",
missionabilities: "Используется Способности соратников/кораблей",
garrisonbuildings: "Используется Здания гарнизона",
hunterpets: "Используется Питомцы охотников",
threats: "Используется Угрозы",
classes: "Используется Классы"
},
// custom
fienchantments: {
id: "Номер",

View file

@ -0,0 +1,42 @@
<?php $this->brick('header'); ?>
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
<?php
$this->brick('announcement');
$this->brick('pageTemplate');
$this->brick('infobox');
?>
<div class="text">
<?php
$this->brick('redButtons');
?>
<h1><?=$this->name; ?></h1>
<div id="h1-icon-0" class="h1-icon"></div>
<script type="text/javascript">//<![CDATA[
$WH.ge('h1-icon-0').appendChild(Icon.create("<?=$this->icon;?>", 2));
//]]></script>
<?php
$this->brick('article');
?>
<div class="clear"></div>
<h2 class="clear"><?php echo Lang::main('related'); ?></h2>
</div>
<?php
$this->brick('lvTabs', ['relTabs' => true]);
$this->brick('contribute');
?>
<div class="clear"></div>
</div><!-- main-contents -->
</div><!-- main -->
<?php $this->brick('footer'); ?>

View file

@ -0,0 +1,61 @@
<?php
$this->brick('header');
$f = $this->filter; // shorthand
?>
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
<?php
$this->brick('announcement');
$this->brick('pageTemplate', ['fi' => empty($f['query']) ? null : ['query' => $f['query'], 'menuItem' => 101]]);
?>
<div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;">
<form action="?icons&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<table>
<tr>
<td><?php echo Util::ucFirst(Lang::main('name')).Lang::main('colon'); ?></td>
<td colspan="2">
<table><tr>
<td>&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td>
</tr></table>
</td>
</tr><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"><?php echo Lang::main('addFilter'); ?></a></div>
<div class="padded2">
<?php echo Lang::main('match').Lang::main('colon'); ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::main('allFilter'); ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::main('oneFilter'); ?></label>
</div>
<div class="clear"></div>
<div class="padded">
<input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div>
</form>
<div class="pad"></div>
</div>
<script type="text/javascript">//<![CDATA[
fi_init('icons');
<?php
foreach ($f['fi'] as $str):
echo ' '.$str."\n";
endforeach;
?>
//]]></script>
<?php $this->brick('lvTabs'); ?>
<div class="clear"></div>
</div><!-- main-contents -->
</div><!-- main -->
<?php $this->brick('footer'); ?>