Bazaar developer reference

CvBuildingEntry::GetYieldChangePerPop(int) const

Defined in
CvBuildingClasses.cpp, line 1719
Class
CvBuildingEntry
Hook name
CivHooks::CvBuildingEntry_GetYieldChangePerPop

Hooks

static bool BeforeCvBuildingEntry_GetYieldChangePerPop(const CvBuildingEntry* self, int i, int& result);static void AfterCvBuildingEntry_GetYieldChangePerPop(const CvBuildingEntry* self, int i, int& result);static int ReplaceCvBuildingEntry_GetYieldChangePerPop(int (*original)(const CvBuildingEntry*, int), const CvBuildingEntry* self, int i);CivRegisterBefore<CivHooks::CvBuildingEntry_GetYieldChangePerPop>(host, &BeforeCvBuildingEntry_GetYieldChangePerPop);CivRegisterAfter<CivHooks::CvBuildingEntry_GetYieldChangePerPop>(host, &AfterCvBuildingEntry_GetYieldChangePerPop);CivRegisterReplace<CivHooks::CvBuildingEntry_GetYieldChangePerPop>(host, &ReplaceCvBuildingEntry_GetYieldChangePerPop);

Code

1718/// Change to yield by type1719int CvBuildingEntry::GetYieldChangePerPop(int i) const1720{1721	CvAssertMsg(i < NUM_YIELD_TYPES, "Index out of bounds");1722	CvAssertMsg(i > -1, "Index out of bounds");1723	return m_piYieldChangePerPop ? m_piYieldChangePerPop[i] : -1;1724}

Called by