Bazaar developer reference

CvUnitEntry::GetFreePromotions(int) const

Defined in
CvUnitClasses.cpp, line 1196
Class
CvUnitEntry
Hook name
CivHooks::CvUnitEntry_GetFreePromotions

Hooks

static bool BeforeCvUnitEntry_GetFreePromotions(const CvUnitEntry* self, int i, bool& result);static void AfterCvUnitEntry_GetFreePromotions(const CvUnitEntry* self, int i, bool& result);static bool ReplaceCvUnitEntry_GetFreePromotions(bool (*original)(const CvUnitEntry*, int), const CvUnitEntry* self, int i);CivRegisterBefore<CivHooks::CvUnitEntry_GetFreePromotions>(host, &BeforeCvUnitEntry_GetFreePromotions);CivRegisterAfter<CivHooks::CvUnitEntry_GetFreePromotions>(host, &AfterCvUnitEntry_GetFreePromotions);CivRegisterReplace<CivHooks::CvUnitEntry_GetFreePromotions>(host, &ReplaceCvUnitEntry_GetFreePromotions);

Code

1195/// Initial set of promotions for this unit1196bool CvUnitEntry::GetFreePromotions(int i) const1197{1198	CvAssertMsg(i < GC.getNumPromotionInfos(), "Index out of bounds");1199	CvAssertMsg(i > -1, "Index out of bounds");1200	return m_pbFreePromotions ? m_pbFreePromotions[i] : false;1201}

Called by