mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
* rewritten to be able to dynamicly load it's components
- CLISetup -> checks for UtilityScripts (config, setup, dbc reader, etc.) -> checks for SetupScripts (individual sql/file generators)
- each step may now have a help prompt attached. If none are provided, the containing script may provide it's help.
- all Scripts are self contained modules. No more editing of 3+ files if some component is added/removed
* removed intermediaries FileGen & SqlGen
* functional changes
- allow providing CLI arguments to siteconfig and account UtilityScript and skip the interactive prompts
- set slot for consumable enchantment items so they are filtrable
- zones dataset is now localized and generated from GlobalStrings.lua and DungeonMap.dbc. Related data dumps removed.
- 'aowow' and 'prQueue' executables now have shebangs
WARNING - command line options have been renamed!
45 lines
1.2 KiB
PHP
45 lines
1.2 KiB
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
if (!CLI)
|
|
die('not in cli mode');
|
|
|
|
|
|
CLISetup::registerSetup("sql", new class extends SetupScript
|
|
{
|
|
protected $info = array(
|
|
'talents' => [[], CLISetup::ARGV_PARAM, 'Compiles supplemental data for type: Profile from dbc.']
|
|
);
|
|
|
|
protected $dbcSourceFiles = ['talent', 'talenttab'];
|
|
|
|
public function generate(array $ids = []) : bool
|
|
{
|
|
DB::Aowow()->query('TRUNCATE ?_talents');
|
|
|
|
// class: 0 => hunter pets
|
|
for ($i = 1; $i < 6; $i++)
|
|
DB::Aowow()->query(
|
|
'INSERT INTO ?_talents
|
|
SELECT t.id,
|
|
IF(tt.classMask <> 0, LOG(2, tt.classMask) + 1, 0),
|
|
tt.creatureFamilyMask,
|
|
IF(tt.creaturefamilyMask <> 0, LOG(2, tt.creaturefamilyMask), tt.tabNumber),
|
|
t.row,
|
|
t.column,
|
|
t.rank?d,
|
|
?d
|
|
FROM dbc_talenttab tt
|
|
JOIN dbc_talent t ON tt.id = t.tabId
|
|
WHERE t.rank?d <> 0',
|
|
$i, $i, $i
|
|
);
|
|
|
|
return true;
|
|
}
|
|
});
|
|
|
|
?>
|