Analyzing scattering of electromagnetic waves in a two-dimensional photonic crystal from the viewpoint of scattering theory, we come to the conclusion that multiple rescattering of waves by the centers (wires) composing the crystal significantly affects the imaginary part of the crystal refractive index. As a result, it appears that, in the case of crystals, the classical expression relating the refractive index of a random medium to the amplitude of scattering by a single center has limited application, because it does not properly describe the attenuation of waves. We derive an expression that, unlike the classical one, includes the effective amplitude of scattering by a wire in a crystal, instead of the amplitude of scattering by a single wire in vacuum. The same effective amplitude must appear in the equation describing the dynamical diffraction of waves in crystals. We also derive the expression for the effective amplitude in the case when scattering by a single center is anisotropic. Because a most general approach is applied to the description of the scattering process, the results are valid for a wide range of cases without being restricted to either electromagnetic waves or crystals built from wires.