Bazaar developer reference

CvGame::incrementUnitClassCreatedCount(UnitClassTypes)

Defined in
CvGame.cpp, line 7358
Class
CvGame
Hook name
CivHooks::CvGame_incrementUnitClassCreatedCount

Hooks

static bool BeforeCvGame_incrementUnitClassCreatedCount(CvGame* self, UnitClassTypes eIndex);static void AfterCvGame_incrementUnitClassCreatedCount(CvGame* self, UnitClassTypes eIndex);static void ReplaceCvGame_incrementUnitClassCreatedCount(void (*original)(CvGame*, UnitClassTypes), CvGame* self, UnitClassTypes eIndex);CivRegisterBefore<CivHooks::CvGame_incrementUnitClassCreatedCount>(host, &BeforeCvGame_incrementUnitClassCreatedCount);CivRegisterAfter<CivHooks::CvGame_incrementUnitClassCreatedCount>(host, &AfterCvGame_incrementUnitClassCreatedCount);CivRegisterReplace<CivHooks::CvGame_incrementUnitClassCreatedCount>(host, &ReplaceCvGame_incrementUnitClassCreatedCount);

Code

7358void CvGame::incrementUnitClassCreatedCount(UnitClassTypes eIndex)7359{7360	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");7361	CvAssertMsg(eIndex < GC.getNumUnitClassInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");7362	m_paiUnitClassCreatedCount[eIndex]++;7363}

Called by