// Fetch descendent items
OSDArray items = (OSDArray)res.get("items");
for (int i = 0; i < items.count(); i++)
{
OSDMap descItem = (OSDMap)items.get(i);
InventoryType a;
InventoryType type = InventoryType.get((byte)descItem.get("inv_type").asInteger());
if (type == InventoryType.Texture && (AssetType.get((byte)descItem.get("type").asInteger()) == AssetType.Object))
{
type = InventoryType.Attachment;
}
InventoryItem item = CreateInventoryItem(type, descItem.get("item_id").asUUID());