Bazaar developer reference

CvCity::getHurryCost(HurryTypes, bool, UnitTypes, bool) const

Defined in
CvCity.cpp, line 7496
Class
CvCity
Hook name
CivHooks::CvCity_getHurryCost

Hooks

static bool BeforeCvCity_getHurryCost(const CvCity* self, HurryTypes eHurry, bool bExtra, UnitTypes eUnit, bool bIgnoreNew, int& result);static void AfterCvCity_getHurryCost(const CvCity* self, HurryTypes eHurry, bool bExtra, UnitTypes eUnit, bool bIgnoreNew, int& result);static int ReplaceCvCity_getHurryCost(int (*original)(const CvCity*, HurryTypes, bool, UnitTypes, bool), const CvCity* self, HurryTypes eHurry, bool bExtra, UnitTypes eUnit, bool bIgnoreNew);CivRegisterBefore<CivHooks::CvCity_getHurryCost>(host, &BeforeCvCity_getHurryCost);CivRegisterAfter<CivHooks::CvCity_getHurryCost>(host, &AfterCvCity_getHurryCost);CivRegisterReplace<CivHooks::CvCity_getHurryCost>(host, &ReplaceCvCity_getHurryCost);

Code

7496int CvCity::getHurryCost(HurryTypes eHurry, bool bExtra, UnitTypes eUnit, bool bIgnoreNew) const7497{7498	VALIDATE_OBJECT7499	int iProductionLeft = getProductionNeeded(eUnit) - getUnitProduction(eUnit);75007501	return getHurryCost(bExtra, iProductionLeft, getHurryCostModifier(eHurry, eUnit, bIgnoreNew), getProductionModifier(eUnit));7502}

Calls

Called by