Bazaar developer reference

CvArea::getYieldRateModifier(PlayerTypes, YieldTypes) const

Defined in
CvArea.cpp, line 550
Class
CvArea
Hook name
CivHooks::CvArea_getYieldRateModifier

Hooks

static bool BeforeCvArea_getYieldRateModifier(const CvArea* self, PlayerTypes eIndex1, YieldTypes eIndex2, int& result);static void AfterCvArea_getYieldRateModifier(const CvArea* self, PlayerTypes eIndex1, YieldTypes eIndex2, int& result);static int ReplaceCvArea_getYieldRateModifier(int (*original)(const CvArea*, PlayerTypes, YieldTypes), const CvArea* self, PlayerTypes eIndex1, YieldTypes eIndex2);CivRegisterBefore<CivHooks::CvArea_getYieldRateModifier>(host, &BeforeCvArea_getYieldRateModifier);CivRegisterAfter<CivHooks::CvArea_getYieldRateModifier>(host, &AfterCvArea_getYieldRateModifier);CivRegisterReplace<CivHooks::CvArea_getYieldRateModifier>(host, &ReplaceCvArea_getYieldRateModifier);

Code

550int CvArea::getYieldRateModifier(PlayerTypes eIndex1, YieldTypes eIndex2) const551{552	CvAssertMsg(eIndex1 >= 0, "eIndex1 is expected to be >= 0");553	CvAssertMsg(eIndex1 < MAX_PLAYERS, "eIndex1 is expected to be < MAX_PLAYERS");554	if(eIndex1 < 0 || eIndex1 >= MAX_PLAYERS) return 0;555556	CvAssertMsg(eIndex2 >= 0, "eIndex2 is expected to be >= 0");557	CvAssertMsg(eIndex2 < NUM_YIELD_TYPES, "eIndex2 is expected to be < NUM_YIELD_TYPES");558	if(eIndex2 < 0 || eIndex2 >= MAX_PLAYERS) return 0;559560	return m_aaiYieldRateModifier[eIndex1][eIndex2];561}

Called by