One has to keep in mind that the black body radiation curve comes out with the specific assumptions seen here.. In these assumptions the specific atomic content of the matter involved does not enter. It was just assumed that matter in bulk will behave this way and the hypothesis was approximately validated, because no radiation spectrum has even a hint of ultraviolet catastropy, but all data approximately follow the black body formula for radiation.
Here is the radiations from the sun, to get an idea of approximately:
The yellow histogram is the observed, the black line of black body radiation more or less fits it. Here is the ideal black body spectrum for the sun temperature.
The best black body fit is given by the cosmic microwave radiation, where the contribution of atomic and molecular spectra is non existent ( it it the decoupled photons from 280.000 years after the big bang).
Once atomic and molecular spectra become important radiation components(i.e emitted with high probability), then it is a bad fit story:
The answer here may help.
The point to keep in mind is that black body radiation fits data with spectral lines too, approximately.