CvPolicyEntry::GetPlotYieldChanges(int, int) const
- Defined in
- CvPolicyClasses.cpp, line 2083
- Class
- CvPolicyEntry
- Hook name
CivHooks::CvPolicyEntry_GetPlotYieldChanges
Hooks
static bool BeforeCvPolicyEntry_GetPlotYieldChanges(const CvPolicyEntry* self, int i, int j, int& result);static void AfterCvPolicyEntry_GetPlotYieldChanges(const CvPolicyEntry* self, int i, int j, int& result);static int ReplaceCvPolicyEntry_GetPlotYieldChanges(int (*original)(const CvPolicyEntry*, int, int), const CvPolicyEntry* self, int i, int j);CivRegisterBefore<CivHooks::CvPolicyEntry_GetPlotYieldChanges>(host, &BeforeCvPolicyEntry_GetPlotYieldChanges);CivRegisterAfter<CivHooks::CvPolicyEntry_GetPlotYieldChanges>(host, &AfterCvPolicyEntry_GetPlotYieldChanges);CivRegisterReplace<CivHooks::CvPolicyEntry_GetPlotYieldChanges>(host, &ReplaceCvPolicyEntry_GetPlotYieldChanges);
Code
2081#if defined(MOD_API_UNIFIED_YIELDS) && defined(MOD_API_PLOT_YIELDS)2082/// Yield modifier for a specific plot by yield type2083int CvPolicyEntry::GetPlotYieldChanges(int i, int j) const2084{2085 if (MOD_API_PLOT_YIELDS) {2086 CvAssertMsg(i < GC.getNumPlotInfos(), "Index out of bounds");2087 CvAssertMsg(i > -1, "Index out of bounds");2088 CvAssertMsg(j < NUM_YIELD_TYPES, "Index out of bounds");2089 CvAssertMsg(j > -1, "Index out of bounds");2090 return m_ppiPlotYieldChanges[i][j];2091 } else {2092 return 0;2093 }2094}