Bazaar developer reference

CvBeliefEntry::GetPlotYieldChange(int, int) const

Defined in
CvBeliefClasses.cpp, line 655
Class
CvBeliefEntry
Hook name
CivHooks::CvBeliefEntry_GetPlotYieldChange

Hooks

static bool BeforeCvBeliefEntry_GetPlotYieldChange(const CvBeliefEntry* self, int i, int j, int& result);static void AfterCvBeliefEntry_GetPlotYieldChange(const CvBeliefEntry* self, int i, int j, int& result);static int ReplaceCvBeliefEntry_GetPlotYieldChange(int (*original)(const CvBeliefEntry*, int, int), const CvBeliefEntry* self, int i, int j);CivRegisterBefore<CivHooks::CvBeliefEntry_GetPlotYieldChange>(host, &BeforeCvBeliefEntry_GetPlotYieldChange);CivRegisterAfter<CivHooks::CvBeliefEntry_GetPlotYieldChange>(host, &AfterCvBeliefEntry_GetPlotYieldChange);CivRegisterReplace<CivHooks::CvBeliefEntry_GetPlotYieldChange>(host, &ReplaceCvBeliefEntry_GetPlotYieldChange);

Code

653#if defined(MOD_RELIGION_PLOT_YIELDS)654/// Change to yield by plot655int CvBeliefEntry::GetPlotYieldChange(int i, int j) const656{657	if (MOD_API_PLOT_YIELDS) {658		CvAssertMsg(i < GC.getNumPlotInfos(), "Index out of bounds");659		CvAssertMsg(i > -1, "Index out of bounds");660		CvAssertMsg(j < NUM_YIELD_TYPES, "Index out of bounds");661		CvAssertMsg(j > -1, "Index out of bounds");662		return m_ppiPlotYieldChange ? m_ppiPlotYieldChange[i][j] : -1;663	} else {664		return 0;665	}666}

Calls

Called by