mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
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:
@@ -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));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user