Bazaar developer reference

CvGame::incrementUnitCreatedCount(UnitTypes)

Defined in
CvGame.cpp, line 7317
Class
CvGame
Hook name
CivHooks::CvGame_incrementUnitCreatedCount

Hooks

static bool BeforeCvGame_incrementUnitCreatedCount(CvGame* self, UnitTypes eIndex);static void AfterCvGame_incrementUnitCreatedCount(CvGame* self, UnitTypes eIndex);static void ReplaceCvGame_incrementUnitCreatedCount(void (*original)(CvGame*, UnitTypes), CvGame* self, UnitTypes eIndex);CivRegisterBefore<CivHooks::CvGame_incrementUnitCreatedCount>(host, &BeforeCvGame_incrementUnitCreatedCount);CivRegisterAfter<CivHooks::CvGame_incrementUnitCreatedCount>(host, &AfterCvGame_incrementUnitCreatedCount);CivRegisterReplace<CivHooks::CvGame_incrementUnitCreatedCount>(host, &ReplaceCvGame_incrementUnitCreatedCount);

Code

7317void CvGame::incrementUnitCreatedCount(UnitTypes eIndex)7318{7319	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");7320	CvAssertMsg(eIndex < GC.getNumUnitInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");7321	m_paiUnitCreatedCount[eIndex]++;7322}

Called by