Bazaar developer reference

CvPromotionEntry::IsPostCombatRandomPromotion(int) const

Defined in
CvPromotionClasses.cpp, line 2092
Class
CvPromotionEntry
Hook name
CivHooks::CvPromotionEntry_IsPostCombatRandomPromotion

Hooks

static bool BeforeCvPromotionEntry_IsPostCombatRandomPromotion(const CvPromotionEntry* self, int i, bool& result);static void AfterCvPromotionEntry_IsPostCombatRandomPromotion(const CvPromotionEntry* self, int i, bool& result);static bool ReplaceCvPromotionEntry_IsPostCombatRandomPromotion(bool (*original)(const CvPromotionEntry*, int), const CvPromotionEntry* self, int i);CivRegisterBefore<CivHooks::CvPromotionEntry_IsPostCombatRandomPromotion>(host, &BeforeCvPromotionEntry_IsPostCombatRandomPromotion);CivRegisterAfter<CivHooks::CvPromotionEntry_IsPostCombatRandomPromotion>(host, &AfterCvPromotionEntry_IsPostCombatRandomPromotion);CivRegisterReplace<CivHooks::CvPromotionEntry_IsPostCombatRandomPromotion>(host, &ReplaceCvPromotionEntry_IsPostCombatRandomPromotion);

Code

2091/// If this a promotion that can randomly turn into other c2092bool CvPromotionEntry::IsPostCombatRandomPromotion(int i) const2093{2094	CvAssertMsg(i < GC.getNumPromotionInfos(), "Index out of bounds");2095	CvAssertMsg(i > -1, "Index out of bounds");2096	return m_pbPostCombatRandomPromotion ? m_pbPostCombatRandomPromotion[i] : false;2097}

Called by