* 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

@@ -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);