function item_stats(array $ids = []) { $offset = 0; CLISetup::log(' - applying stats for enchantments'); $enchStats = enchantment_stats(); CLISetup::log(' ' . count($enchStats) . ' enchantments parsed'); CLISetup::log(' - applying stats for items'); while (true) { $items = new ItemStatSetup($offset, SqlGen::$stepSize, $ids, $enchStats); if ($items->error) { break; } $max = max($items->getFoundIDs()); $num = count($items->getFoundIDs()); CLISetup::log(' * sets ' . ($offset + 1) . ' - ' . $max); $offset = $max; $items->writeStatsTable(); } return true; }
function item_stats(array $ids = []) { $offset = 0; while (true) { $items = new ItemStatSetup($offset, SqlGen::$stepSize, $ids); if ($items->error) { break; } $max = max($items->getFoundIDs()); $num = count($items->getFoundIDs()); CLISetup::log(' * sets ' . ($offset + 1) . ' - ' . $max); $offset = $max; $items->writeStatsTable(); } return true; }