Bazaar developer reference

CvImprovementEntry::GetAdjacentMountainYieldChange(int) const

Defined in
CvImprovementClasses.cpp, line 1067
Class
CvImprovementEntry
Hook name
CivHooks::CvImprovementEntry_GetAdjacentMountainYieldChange

Hooks

static bool BeforeCvImprovementEntry_GetAdjacentMountainYieldChange(const CvImprovementEntry* self, int i, int& result);static void AfterCvImprovementEntry_GetAdjacentMountainYieldChange(const CvImprovementEntry* self, int i, int& result);static int ReplaceCvImprovementEntry_GetAdjacentMountainYieldChange(int (*original)(const CvImprovementEntry*, int), const CvImprovementEntry* self, int i);CivRegisterBefore<CivHooks::CvImprovementEntry_GetAdjacentMountainYieldChange>(host, &BeforeCvImprovementEntry_GetAdjacentMountainYieldChange);CivRegisterAfter<CivHooks::CvImprovementEntry_GetAdjacentMountainYieldChange>(host, &AfterCvImprovementEntry_GetAdjacentMountainYieldChange);CivRegisterReplace<CivHooks::CvImprovementEntry_GetAdjacentMountainYieldChange>(host, &ReplaceCvImprovementEntry_GetAdjacentMountainYieldChange);

Code

1066/// How much being adjacent to a mountain improves the yield of this improvement1067int CvImprovementEntry::GetAdjacentMountainYieldChange(int i) const1068{1069	CvAssertMsg(i < NUM_YIELD_TYPES, "Index out of bounds");1070	CvAssertMsg(i > -1, "Index out of bounds");1071	return m_piAdjacentMountainYieldChange ? m_piAdjacentMountainYieldChange[i] : 0;1072}

Called by