Bazaar developer reference

CvCityEmphases::GetEmphasizeYieldCount(YieldTypes)

Defined in
CvEmphasisClasses.cpp, line 173
Class
CvCityEmphases
Hook name
CivHooks::CvCityEmphases_GetEmphasizeYieldCount

Hooks

static bool BeforeCvCityEmphases_GetEmphasizeYieldCount(CvCityEmphases* self, YieldTypes eIndex, int& result);static void AfterCvCityEmphases_GetEmphasizeYieldCount(CvCityEmphases* self, YieldTypes eIndex, int& result);static int ReplaceCvCityEmphases_GetEmphasizeYieldCount(int (*original)(CvCityEmphases*, YieldTypes), CvCityEmphases* self, YieldTypes eIndex);CivRegisterBefore<CivHooks::CvCityEmphases_GetEmphasizeYieldCount>(host, &BeforeCvCityEmphases_GetEmphasizeYieldCount);CivRegisterAfter<CivHooks::CvCityEmphases_GetEmphasizeYieldCount>(host, &AfterCvCityEmphases_GetEmphasizeYieldCount);CivRegisterReplace<CivHooks::CvCityEmphases_GetEmphasizeYieldCount>(host, &ReplaceCvCityEmphases_GetEmphasizeYieldCount);

Code

172/// What is this city's yield boost due to emphasis?173int CvCityEmphases::GetEmphasizeYieldCount(YieldTypes eIndex)174{175	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");176	CvAssertMsg(eIndex < NUM_YIELD_TYPES, "eIndex is expected to be within maximum bounds (invalid Index)");177	if(eIndex >= 0 && eIndex < NUM_YIELD_TYPES)178		return m_aiEmphasizeYieldCount[eIndex];179	return 0; // default set during "reset"180}

Called by