private static function validateSet($set, array $mods, array $items) { foreach ($mods as $mod => $val) { if (!SR_Player::isValidModifier($mod)) { die(sprintf("The ItemSet %s has an invalid bonus modifier: %s.\n", $set, $mod)); } } foreach ($items as $items2) { if (is_array($items2)) { foreach ($items2 as $itemname) { if (!SR_Item::exists($itemname)) { die(sprintf("The ItemSet %s has an unknown item: %s.\n", $set, $itemname)); } } } else { if (!SR_Item::exists($items2)) { die(sprintf("The ItemSet %s has an unknown item: %s.\n", $set, $items2)); } } } }