Bazaar developer reference

CvCity::getFreePromotionCount(PromotionTypes) const

Defined in
CvCity.cpp, line 11662
Class
CvCity
Hook name
CivHooks::CvCity_getFreePromotionCount

Hooks

static bool BeforeCvCity_getFreePromotionCount(const CvCity* self, PromotionTypes eIndex, int& result);static void AfterCvCity_getFreePromotionCount(const CvCity* self, PromotionTypes eIndex, int& result);static int ReplaceCvCity_getFreePromotionCount(int (*original)(const CvCity*, PromotionTypes), const CvCity* self, PromotionTypes eIndex);CivRegisterBefore<CivHooks::CvCity_getFreePromotionCount>(host, &BeforeCvCity_getFreePromotionCount);CivRegisterAfter<CivHooks::CvCity_getFreePromotionCount>(host, &AfterCvCity_getFreePromotionCount);CivRegisterReplace<CivHooks::CvCity_getFreePromotionCount>(host, &ReplaceCvCity_getFreePromotionCount);

Code

11662int CvCity::getFreePromotionCount(PromotionTypes eIndex) const11663{11664	VALIDATE_OBJECT11665	CvAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");11666	CvAssertMsg(eIndex < GC.getNumPromotionInfos(), "eIndex expected to be < GC.getNumPromotionInfos()");11667	return m_paiFreePromotionCount[eIndex];11668}

Calls

Called by