} if ($first) { if (array_key_exists($group, $cuirass)) { $wk->table_section("{$group} Armor", $cuirass[$group]); } else { $wk->table_section("{$group} Armor"); } if (array_key_exists($group, $sumdata)) { $wk->total_row($sumdata[$group]); } $first = false; } $done[$itemid] = true; if (array_key_exists('pair', $data)) { $pairs = array_merge(array($item), $data['pair']); $wk->table_row($pairs); foreach ($data['pair'] as $pitem) { $done[$pitem->id()] = true; } } else { $wk->table_row($item); } } } // add check whether all items are same armor class... use cuirass for table section, not just set[0] $wk->end_table(); print "\n\n\n"; $wk->set_columns('special items'); $wk->start_table(); $done = array(); foreach ($set as $itemid => $data) {
$set = $cs->get_item_set($rectype, $style); print "{$style}\n"; foreach ($set as $key => $item) { print " {$key} "; if (!is_null($item)) { print $item->edid() . " " . $item->name() . " " . $item->get('skill'); } print "\n"; } // add check whether all items are same armor class... use cuirass for table section, not just set[0] $set = $cs->get_item_set($rectype, $style, 'base'); $wk->set_columns($rectype, 'style_page'); $wk->start_table(); $wk->table_section("{$style} Weapons", $set[0]); foreach ($set as $subset) { $wk->table_row($subset); } $wk->end_table(); print "\n"; foreach ($set as $subset) { foreach ($subset as $item) { $matches = $cs->find_icon_matches($item); if (count($matches)) { print $item->name() . " (" . $item->edid() . ")\n"; foreach ($matches as $mitem) { print " " . $mitem->name() . " (" . $mitem->edid() . ")\n"; } } } } print "\n\n\n";