mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
IconDB
* 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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user