mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Setup/DBC
* move dbc structures to separate files and allow loading a specific build * handle localized single string fields * add cli option for output table name * add cli option for wowbuild
This commit is contained in:
@@ -51,21 +51,14 @@ switch ($cmd) // we accept only on
|
||||
sync($s, $b);
|
||||
finish();
|
||||
case 'dbc':
|
||||
foreach (CLISetup::getOpt('dbc') as $n)
|
||||
{
|
||||
if (empty($n))
|
||||
continue;
|
||||
require_once 'setup/tools/clisetup/dbc.func.php';
|
||||
|
||||
$dbc = new DBC(trim($n), ['temporary' => false]);
|
||||
if ($dbc->error)
|
||||
return false;
|
||||
$args = [];
|
||||
foreach ($argv as $i => $str)
|
||||
if ($i && $str[0] != '-')
|
||||
$args[] = $str;
|
||||
|
||||
if (!$dbc->readFile())
|
||||
{
|
||||
CLI::write('CLISetup::loadDBC() - DBC '.$n.'.dbc could not be written to DB!', CLI::LOG_ERROR);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
dbc($args);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user