Bazaar developer reference

CvPromotionEntry::GetFeaturePassableTech(int) const

Defined in
CvPromotionClasses.cpp, line 1926
Class
CvPromotionEntry
Hook name
CivHooks::CvPromotionEntry_GetFeaturePassableTech

Hooks

static bool BeforeCvPromotionEntry_GetFeaturePassableTech(const CvPromotionEntry* self, int i, int& result);static void AfterCvPromotionEntry_GetFeaturePassableTech(const CvPromotionEntry* self, int i, int& result);static int ReplaceCvPromotionEntry_GetFeaturePassableTech(int (*original)(const CvPromotionEntry*, int), const CvPromotionEntry* self, int i);CivRegisterBefore<CivHooks::CvPromotionEntry_GetFeaturePassableTech>(host, &BeforeCvPromotionEntry_GetFeaturePassableTech);CivRegisterAfter<CivHooks::CvPromotionEntry_GetFeaturePassableTech>(host, &AfterCvPromotionEntry_GetFeaturePassableTech);CivRegisterReplace<CivHooks::CvPromotionEntry_GetFeaturePassableTech>(host, &ReplaceCvPromotionEntry_GetFeaturePassableTech);

Code

1925/// Returns an array that indicates if a feature type is traversable by the unit1926int CvPromotionEntry::GetFeaturePassableTech(int i) const1927{1928	CvAssertMsg(i < GC.getNumFeatureInfos(), "Index out of bounds");1929	CvAssertMsg(i > -1, "Index out of bounds");19301931	if(i > -1 && i < GC.getNumFeatureInfos() && m_piFeaturePassableTech)1932	{1933		return m_piFeaturePassableTech[i];1934	}19351936	return -1;1937}

Calls

Called by