We demonstrate the importance of thermal effects such as temperature-induced electronic, magnetic and vibrational excitations, as well as structural defects in the first-principles calculations of the magnetic critical temperature of complex alloys using half-Heusler Ni1-xCuxMnSb alloys as a case study. The thermal lattice expansion and one-electron excitations have been accounted for self-consistently in the Curie temperature calculations. In the Ni-rich region, electronic excitations, thermal expansion, and structural defects substantially decrease the calculated Curie temperature. At the same time, some defects are shown to increase T-C in Cu-rich samples.