Bazaar developer reference

CvGame::makeSpecialUnitValid(SpecialUnitTypes)

Defined in
CvGame.cpp, line 7491
Class
CvGame
Hook name
CivHooks::CvGame_makeSpecialUnitValid

Hooks

static bool BeforeCvGame_makeSpecialUnitValid(CvGame* self, SpecialUnitTypes eIndex);static void AfterCvGame_makeSpecialUnitValid(CvGame* self, SpecialUnitTypes eIndex);static void ReplaceCvGame_makeSpecialUnitValid(void (*original)(CvGame*, SpecialUnitTypes), CvGame* self, SpecialUnitTypes eIndex);CivRegisterBefore<CivHooks::CvGame_makeSpecialUnitValid>(host, &BeforeCvGame_makeSpecialUnitValid);CivRegisterAfter<CivHooks::CvGame_makeSpecialUnitValid>(host, &AfterCvGame_makeSpecialUnitValid);CivRegisterReplace<CivHooks::CvGame_makeSpecialUnitValid>(host, &ReplaceCvGame_makeSpecialUnitValid);

Code

7491void CvGame::makeSpecialUnitValid(SpecialUnitTypes eIndex)7492{7493	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");7494	CvAssertMsg(eIndex < GC.getNumSpecialUnitInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");7495	m_pabSpecialUnitValid[eIndex] = true;7496}

Called by