Setup/Fixups
* sanity check slot / invtype realtion on setup (and hide offenders) * hide internal/unused items by name part * always truncate table to get rid of old data * fixing one->many relation revealed by replacing REPLACE with INSERT in creature setup
This commit is contained in:
parent
1130581152
commit
e916deaafc
4 changed files with 30 additions and 7 deletions
|
|
@ -104,12 +104,13 @@ SqlGen::register(new class extends SetupScript
|
|||
}';
|
||||
|
||||
$i = 0;
|
||||
DB::Aowow()->query('TRUNCATE ?_objects');
|
||||
while ($objects = DB::World()->select($baseQuery, $ids ?: DBSIMPLE_SKIP, SqlGen::$sqlBatchSize * $i, SqlGen::$sqlBatchSize))
|
||||
{
|
||||
CLI::write(' * batch #' . ++$i . ' (' . count($objects) . ')');
|
||||
|
||||
foreach ($objects as $object)
|
||||
DB::Aowow()->query('REPLACE INTO ?_objects VALUES (?a)', array_values($object));
|
||||
DB::Aowow()->query('INSERT INTO ?_objects VALUES (?a)', array_values($object));
|
||||
}
|
||||
|
||||
// apply typeCat and reqSkill depending on locks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue