Bazaar developer reference

CvGame::getUnitClassCreatedCount(UnitClassTypes)

Defined in
CvGame.cpp, line 7326
Class
CvGame
Hook name
CivHooks::CvGame_getUnitClassCreatedCount

Hooks

static bool BeforeCvGame_getUnitClassCreatedCount(CvGame* self, UnitClassTypes eIndex, int& result);static void AfterCvGame_getUnitClassCreatedCount(CvGame* self, UnitClassTypes eIndex, int& result);static int ReplaceCvGame_getUnitClassCreatedCount(int (*original)(CvGame*, UnitClassTypes), CvGame* self, UnitClassTypes eIndex);CivRegisterBefore<CivHooks::CvGame_getUnitClassCreatedCount>(host, &BeforeCvGame_getUnitClassCreatedCount);CivRegisterAfter<CivHooks::CvGame_getUnitClassCreatedCount>(host, &AfterCvGame_getUnitClassCreatedCount);CivRegisterReplace<CivHooks::CvGame_getUnitClassCreatedCount>(host, &ReplaceCvGame_getUnitClassCreatedCount);

Code

7326int CvGame::getUnitClassCreatedCount(UnitClassTypes eIndex)7327{7328	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");7329	CvAssertMsg(eIndex < GC.getNumUnitClassInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");7330	return m_paiUnitClassCreatedCount[eIndex];7331}

Called by