mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-12-01 21:15:20 +08:00
Setup/Scripts
* restructure setup to allow for self contained setup steps to self register (just the sql for now) * should ease adding new scripts in future
This commit is contained in:
@@ -6,15 +6,22 @@ if (!defined('AOWOW_REVISION'))
|
||||
if (!CLI)
|
||||
die('not in cli mode');
|
||||
|
||||
$reqDBC = ['glyphproperties', 'spellicon'];
|
||||
|
||||
function glyphproperties()
|
||||
SqlGen::register(new class extends SetupScript
|
||||
{
|
||||
DB::Aowow()->query('REPLACE INTO ?_glyphproperties SELECT id, spellId, typeFlags, 0, iconId FROM dbc_glyphproperties');
|
||||
protected $command = '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))');
|
||||
protected $tblDependancyAowow = ['icons'];
|
||||
protected $dbcSourceFiles = ['glyphproperties', 'spellicon'];
|
||||
|
||||
return true;
|
||||
}
|
||||
public function generate(array $ids = []) : bool
|
||||
{
|
||||
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;
|
||||
}
|
||||
});
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user