Bazaar developer reference

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

Defined in
CvCity.cpp, line 7435
Class
CvCity
Hook name
CivHooks::CvCity_getHurryCostModifier_with_HurryTypes_UnitTypes_bool_const

Hooks

static bool BeforeCvCity_getHurryCostModifier_with_HurryTypes_UnitTypes_bool_const(const CvCity* self, HurryTypes eHurry, UnitTypes eUnit, bool bIgnoreNew, int& result);static void AfterCvCity_getHurryCostModifier_with_HurryTypes_UnitTypes_bool_const(const CvCity* self, HurryTypes eHurry, UnitTypes eUnit, bool bIgnoreNew, int& result);static int ReplaceCvCity_getHurryCostModifier_with_HurryTypes_UnitTypes_bool_const(int (*original)(const CvCity*, HurryTypes, UnitTypes, bool), const CvCity* self, HurryTypes eHurry, UnitTypes eUnit, bool bIgnoreNew);CivRegisterBefore<CivHooks::CvCity_getHurryCostModifier_with_HurryTypes_UnitTypes_bool_const>(host, &BeforeCvCity_getHurryCostModifier_with_HurryTypes_UnitTypes_bool_const);CivRegisterAfter<CivHooks::CvCity_getHurryCostModifier_with_HurryTypes_UnitTypes_bool_const>(host, &AfterCvCity_getHurryCostModifier_with_HurryTypes_UnitTypes_bool_const);CivRegisterReplace<CivHooks::CvCity_getHurryCostModifier_with_HurryTypes_UnitTypes_bool_const>(host, &ReplaceCvCity_getHurryCostModifier_with_HurryTypes_UnitTypes_bool_const);

Code

7435int CvCity::getHurryCostModifier(HurryTypes eHurry, UnitTypes eUnit, bool bIgnoreNew) const7436{7437	VALIDATE_OBJECT7438	CvUnitEntry* pkUnitInfo = GC.getUnitInfo(eUnit);7439	if(pkUnitInfo)7440	{7441		return getHurryCostModifier(eHurry, pkUnitInfo->GetHurryCostModifier(), getUnitProduction(eUnit), bIgnoreNew);7442	}74437444	return 0;7445}

Calls

Called by