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:
Sarjuuk
2024-06-17 17:23:59 +02:00
parent 12ddc6fe82
commit e164023b8a
6 changed files with 4064 additions and 324 deletions

View File

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