Bazaar developer reference

CvImprovementEntry::GetCoastalLandYieldChange(int) const

Defined in
CvImprovementClasses.cpp, line 1015
Class
CvImprovementEntry
Hook name
CivHooks::CvImprovementEntry_GetCoastalLandYieldChange

Hooks

static bool BeforeCvImprovementEntry_GetCoastalLandYieldChange(const CvImprovementEntry* self, int i, int& result);static void AfterCvImprovementEntry_GetCoastalLandYieldChange(const CvImprovementEntry* self, int i, int& result);static int ReplaceCvImprovementEntry_GetCoastalLandYieldChange(int (*original)(const CvImprovementEntry*, int), const CvImprovementEntry* self, int i);CivRegisterBefore<CivHooks::CvImprovementEntry_GetCoastalLandYieldChange>(host, &BeforeCvImprovementEntry_GetCoastalLandYieldChange);CivRegisterAfter<CivHooks::CvImprovementEntry_GetCoastalLandYieldChange>(host, &AfterCvImprovementEntry_GetCoastalLandYieldChange);CivRegisterReplace<CivHooks::CvImprovementEntry_GetCoastalLandYieldChange>(host, &ReplaceCvImprovementEntry_GetCoastalLandYieldChange);

Code

1014/// How much being on a coastal tile improves the yield of this improvement1015int CvImprovementEntry::GetCoastalLandYieldChange(int i) const1016{1017	CvAssertMsg(i < NUM_YIELD_TYPES, "Index out of bounds");1018	CvAssertMsg(i > -1, "Index out of bounds");1019	return m_piCoastalLandYieldChange ? m_piCoastalLandYieldChange[i] : 0;1020}

Called by