Bazaar developer reference

CvBuildingEntry::GetPlotYieldChange(int, int) const

Defined in
CvBuildingClasses.cpp, line 2102
Class
CvBuildingEntry
Hook name
CivHooks::CvBuildingEntry_GetPlotYieldChange

Hooks

static bool BeforeCvBuildingEntry_GetPlotYieldChange(const CvBuildingEntry* self, int i, int j, int& result);static void AfterCvBuildingEntry_GetPlotYieldChange(const CvBuildingEntry* self, int i, int j, int& result);static int ReplaceCvBuildingEntry_GetPlotYieldChange(int (*original)(const CvBuildingEntry*, int, int), const CvBuildingEntry* self, int i, int j);CivRegisterBefore<CivHooks::CvBuildingEntry_GetPlotYieldChange>(host, &BeforeCvBuildingEntry_GetPlotYieldChange);CivRegisterAfter<CivHooks::CvBuildingEntry_GetPlotYieldChange>(host, &AfterCvBuildingEntry_GetPlotYieldChange);CivRegisterReplace<CivHooks::CvBuildingEntry_GetPlotYieldChange>(host, &ReplaceCvBuildingEntry_GetPlotYieldChange);

Code

2100#if defined(MOD_API_UNIFIED_YIELDS) && defined(MOD_API_PLOT_YIELDS)2101/// Change to Plot yield by type2102int CvBuildingEntry::GetPlotYieldChange(int i, int j) const2103{2104	if (MOD_API_PLOT_YIELDS) {2105		CvAssertMsg(i < GC.getNumPlotInfos(), "Index out of bounds");2106		CvAssertMsg(i > -1, "Index out of bounds");2107		CvAssertMsg(j < NUM_YIELD_TYPES, "Index out of bounds");2108		CvAssertMsg(j > -1, "Index out of bounds");2109		return m_ppaiPlotYieldChange ? m_ppaiPlotYieldChange[i][j] : -1;2110	} else {2111		return 0;2112	}2113}

Calls

Called by