attachmentsPacket.ObjectData[i].NextOwnerMask = (long)Permissions.PermissionMask.getIndex(attachment.Permissions.NextOwnerMask);
attachmentsPacket.ObjectData[i].OwnerID = attachment.OwnerID;
}
else if (attachments.get(i) instanceof InventoryObject)
{
InventoryObject attachment = (InventoryObject)attachments.get(i);
attachmentsPacket.ObjectData[i] = new RezMultipleAttachmentsFromInvPacket.ObjectDataBlock();
attachmentsPacket.ObjectData[i].AttachmentPt = 0;
attachmentsPacket.ObjectData[i].EveryoneMask = (long)Permissions.PermissionMask.getIndex(attachment.Permissions.EveryoneMask);
attachmentsPacket.ObjectData[i].GroupMask = (long)Permissions.PermissionMask.getIndex(attachment.Permissions.GroupMask);
attachmentsPacket.ObjectData[i].ItemFlags = (long)attachment.Flags;