Bazaar developer reference

CvPlayerTechs::GetCivTechUniqueUnit(TechTypes) const

Defined in
CvTechClasses.cpp, line 963
Class
CvPlayerTechs
Hook name
CivHooks::CvPlayerTechs_GetCivTechUniqueUnit

Hooks

static bool BeforeCvPlayerTechs_GetCivTechUniqueUnit(const CvPlayerTechs* self, TechTypes eIndex, UnitTypes& result);static void AfterCvPlayerTechs_GetCivTechUniqueUnit(const CvPlayerTechs* self, TechTypes eIndex, UnitTypes& result);static UnitTypes ReplaceCvPlayerTechs_GetCivTechUniqueUnit(UnitTypes (*original)(const CvPlayerTechs*, TechTypes), const CvPlayerTechs* self, TechTypes eIndex);CivRegisterBefore<CivHooks::CvPlayerTechs_GetCivTechUniqueUnit>(host, &BeforeCvPlayerTechs_GetCivTechUniqueUnit);CivRegisterAfter<CivHooks::CvPlayerTechs_GetCivTechUniqueUnit>(host, &AfterCvPlayerTechs_GetCivTechUniqueUnit);CivRegisterReplace<CivHooks::CvPlayerTechs_GetCivTechUniqueUnit>(host, &ReplaceCvPlayerTechs_GetCivTechUniqueUnit);

Code

963UnitTypes CvPlayerTechs::GetCivTechUniqueUnit(TechTypes eIndex) const964{965	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");966	CvAssertMsg(eIndex < GC.getNumTechInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");967968	return m_peCivTechUniqueUnits[eIndex];969}

Called by