ParseItem(10000 + $skin); ParseItem(20000 + $face); ParseItem(30000 + $hair); // Sort equipment by ID asort($options['slots']); // Fix stand foreach ($options['slots'] as $slot => $itemid) { $data = GetItemWZInfo($itemid, CURRENT_LOCALE); CheckStand(GetItemType($itemid), $data); } // Parse items.. foreach ($options['slots'] as $slot => $itemid) { if (floor($itemid / 100000) == 5) { RenderCashItem($itemid); } else { ParseItem($itemid); } } FindAndAddSetEffect(); FindAndAddItemEffect(); // -------------------------------------------------------------------------------------------------------------------------------- // Render items krsort($data_buffer['zlayers']); $im = imagecreatetruecolor($imageoptions['width'], $imageoptions['height']); imagesavealpha($im, true); $trans = imagecolorallocatealpha($im, 0, 0, 0, 127); imagefill($im, 0, 0, $trans); foreach ($data_buffer['zlayers'] as $zname => $objects) { foreach ($objects as $object) { $zval = $object['info']['z']; if ($object['category'] == 'hairOverHead' && $foundHidingCap) {
function GetItemsToReparse() { global $db; $tr = array(); return $tr; $maxSaveSet = 50; $stmt = $db->prepare('SELECT `id`, `json` FROM tblItem WHERE `json` IS NOT NULL'); $stmt->execute(); $result = $stmt->get_result(); $items = DBMapArray($result, null); $stmt->close(); $set = array(); for ($x = 0; $x < count($items); $x++) { heartbeat(); if (count($set) >= $maxSaveSet) { $tr[] = $set; DebugMessage(str_pad('' . count($tr) * $maxSaveSet, 6, ' ', STR_PAD_LEFT) . ' items reparsed.'); $set = array(); } $set[$items[$x]['id']] = ParseItem($items[$x]['json']); } if (count($set) >= 0) { $tr[] = $set; } return $tr; }