Bazaar developer reference

CvGame::getUnitCreatedCount(UnitTypes)

Defined in
CvGame.cpp, line 7308
Class
CvGame
Hook name
CivHooks::CvGame_getUnitCreatedCount

Hooks

static bool BeforeCvGame_getUnitCreatedCount(CvGame* self, UnitTypes eIndex, int& result);static void AfterCvGame_getUnitCreatedCount(CvGame* self, UnitTypes eIndex, int& result);static int ReplaceCvGame_getUnitCreatedCount(int (*original)(CvGame*, UnitTypes), CvGame* self, UnitTypes eIndex);CivRegisterBefore<CivHooks::CvGame_getUnitCreatedCount>(host, &BeforeCvGame_getUnitCreatedCount);CivRegisterAfter<CivHooks::CvGame_getUnitCreatedCount>(host, &AfterCvGame_getUnitCreatedCount);CivRegisterReplace<CivHooks::CvGame_getUnitCreatedCount>(host, &ReplaceCvGame_getUnitCreatedCount);

Code

7308int CvGame::getUnitCreatedCount(UnitTypes eIndex)7309{7310	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");7311	CvAssertMsg(eIndex < GC.getNumUnitInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");7312	return m_paiUnitCreatedCount[eIndex];7313}

Called by