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:
Sarjuuk
2023-04-23 19:45:44 +02:00
parent 1130581152
commit e916deaafc
4 changed files with 30 additions and 7 deletions

View File

@@ -171,12 +171,13 @@ SqlGen::register(new class extends SetupScript
$i = 0;
DB::Aowow()->query('TRUNCATE ?_quests');
while ($quests = DB::World()->select($baseQuery, $ids ?: DBSIMPLE_SKIP, SqlGen::$sqlBatchSize * $i, SqlGen::$sqlBatchSize))
{
CLI::write(' * batch #' . ++$i . ' (' . count($quests) . ')');
foreach ($quests as $quest)
DB::Aowow()->query('REPLACE INTO ?_quests VALUES (?a)', array_values($quest));
DB::Aowow()->query('INSERT INTO ?_quests VALUES (?a)', array_values($quest));
}
/*