Chest and Ranged (right) => Ranged UPDATE aowow_items SET slot = 15 WHERE slotbak = 26; UPDATE aowow_items SET slot = 5 WHERE slotbak = 20; -- custom sub-classes UPDATE aowow_items SET subClassBak = subClass, slot = slotBak; UPDATE aowow_items SET subclass = IF( slot = 4, -8, IF( -- shirt slot = 19, -7, IF( -- tabard slot = 16, -6, IF( -- cloak slot = 23, -5, IF( -- held in offhand slot = 12, -4, IF( -- trinket slot = 2, -3, IF( -- amulet slot = 11, -2, subClassBak -- ring ) ) ) ) ) ) ) WHERE class = 4; */ class ItemSetup extends ItemList { private $cols = []; public function __construct($start, $end) // i suggest steps of 5k at max (12 steps (0 - 60k)); otherwise eats your ram for breakfast { $this->cols = DB::Aowow()->selectCol('SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA`="world" AND `TABLE_NAME`="aowow_item_stats"'); set_time_limit(300); $conditions = array( ['i.id', $start, '>'], ['i.id', $end, '<='], ['class', [ITEM_CLASS_WEAPON, ITEM_CLASS_GEM, ITEM_CLASS_ARMOR]], 0 ); parent::__construct($conditions); } public function writeStatsTable() { foreach ($this->iterate() as $__) { $this->extendJsonStats(); $updateFields = []; foreach (@$this->json[$this->id] as $k => $v) { if (!in_array($k, $this->cols) || !$v || $k == 'id') continue; $updateFields[$k] = number_format($v, 2, '.', ''); } if (isset($this->itemMods[$this->id])) { foreach ($this->itemMods[$this->id] as $k => $v) { if (!$v) continue; if ($str = Util::$itemMods[$k]) $updateFields[$str] = number_format($v, 2, '.', ''); } } if ($updateFields) DB::Aowow()->query('REPLACE INTO ?_item_stats (`id`, `'.implode('`, `', array_keys($updateFields)).'`) VALUES (?d, "'.implode('", "', $updateFields).'")', $this->id); } } } ?>