Bazaar developer reference

CvTeam::setVictoryCountdown(VictoryTypes, int)

Defined in
CvTeam.cpp, line 5096
Class
CvTeam
Hook name
CivHooks::CvTeam_setVictoryCountdown

Hooks

static bool BeforeCvTeam_setVictoryCountdown(CvTeam* self, VictoryTypes eIndex, int iTurnsLeft);static void AfterCvTeam_setVictoryCountdown(CvTeam* self, VictoryTypes eIndex, int iTurnsLeft);static void ReplaceCvTeam_setVictoryCountdown(void (*original)(CvTeam*, VictoryTypes, int), CvTeam* self, VictoryTypes eIndex, int iTurnsLeft);CivRegisterBefore<CivHooks::CvTeam_setVictoryCountdown>(host, &BeforeCvTeam_setVictoryCountdown);CivRegisterAfter<CivHooks::CvTeam_setVictoryCountdown>(host, &AfterCvTeam_setVictoryCountdown);CivRegisterReplace<CivHooks::CvTeam_setVictoryCountdown>(host, &ReplaceCvTeam_setVictoryCountdown);

Code

5096void CvTeam::setVictoryCountdown(VictoryTypes eIndex, int iTurnsLeft)5097{5098	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");5099	CvAssertMsg(eIndex < GC.getNumVictoryInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");5100	m_aiVictoryCountdown[eIndex] = iTurnsLeft;5101}

Called by