Accretion shocks in young stars: the role of local absorption on the X-ray emission