Bazaar developer reference

CvPlayer::getUnitClassCount(UnitClassTypes) const

Defined in
CvPlayer.cpp, line 20443
Class
CvPlayer
Hook name
CivHooks::CvPlayer_getUnitClassCount

Hooks

static bool BeforeCvPlayer_getUnitClassCount(const CvPlayer* self, UnitClassTypes eIndex, int& result);static void AfterCvPlayer_getUnitClassCount(const CvPlayer* self, UnitClassTypes eIndex, int& result);static int ReplaceCvPlayer_getUnitClassCount(int (*original)(const CvPlayer*, UnitClassTypes), const CvPlayer* self, UnitClassTypes eIndex);CivRegisterBefore<CivHooks::CvPlayer_getUnitClassCount>(host, &BeforeCvPlayer_getUnitClassCount);CivRegisterAfter<CivHooks::CvPlayer_getUnitClassCount>(host, &AfterCvPlayer_getUnitClassCount);CivRegisterReplace<CivHooks::CvPlayer_getUnitClassCount>(host, &ReplaceCvPlayer_getUnitClassCount);

Code

20443int CvPlayer::getUnitClassCount(UnitClassTypes eIndex) const20444{20445	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");20446	CvAssertMsg(eIndex < GC.getNumUnitClassInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");20447	return m_paiUnitClassCount[eIndex];20448}

Calls

Called by