Bazaar developer reference

CvPromotionEntry::GetYieldFromKills(int) const

Defined in
CvPromotionClasses.cpp, line 1828
Class
CvPromotionEntry
Hook name
CivHooks::CvPromotionEntry_GetYieldFromKills

Hooks

static bool BeforeCvPromotionEntry_GetYieldFromKills(const CvPromotionEntry* self, int i, int& result);static void AfterCvPromotionEntry_GetYieldFromKills(const CvPromotionEntry* self, int i, int& result);static int ReplaceCvPromotionEntry_GetYieldFromKills(int (*original)(const CvPromotionEntry*, int), const CvPromotionEntry* self, int i);CivRegisterBefore<CivHooks::CvPromotionEntry_GetYieldFromKills>(host, &BeforeCvPromotionEntry_GetYieldFromKills);CivRegisterAfter<CivHooks::CvPromotionEntry_GetYieldFromKills>(host, &AfterCvPromotionEntry_GetYieldFromKills);CivRegisterReplace<CivHooks::CvPromotionEntry_GetYieldFromKills>(host, &ReplaceCvPromotionEntry_GetYieldFromKills);

Code

1827#if defined(MOD_API_UNIFIED_YIELDS)1828int CvPromotionEntry::GetYieldFromKills(int i) const1829{1830	CvAssertMsg(i < NUM_YIELD_TYPES, "Index out of bounds");1831	CvAssertMsg(i > -1, "Index out of bounds");18321833	if(i > -1 && i < NUM_YIELD_TYPES && m_piYieldFromKills)1834	{1835		return m_piYieldFromKills[i];1836	}18371838	return 0;1839}

Called by