Bazaar developer reference

CvUnit::getHurryProduction(const CvPlot *) const

Defined in
CvUnit.cpp, line 9199
Class
CvUnit
Hook name
CivHooks::CvUnit_getHurryProduction

Hooks

static bool BeforeCvUnit_getHurryProduction(const CvUnit* self, const CvPlot* pPlot, int& result);static void AfterCvUnit_getHurryProduction(const CvUnit* self, const CvPlot* pPlot, int& result);static int ReplaceCvUnit_getHurryProduction(int (*original)(const CvUnit*, const CvPlot*), const CvUnit* self, const CvPlot* pPlot);CivRegisterBefore<CivHooks::CvUnit_getHurryProduction>(host, &BeforeCvUnit_getHurryProduction);CivRegisterAfter<CivHooks::CvUnit_getHurryProduction>(host, &AfterCvUnit_getHurryProduction);CivRegisterReplace<CivHooks::CvUnit_getHurryProduction>(host, &ReplaceCvUnit_getHurryProduction);

Code

9199int CvUnit::getHurryProduction(const CvPlot* pPlot) const9200{9201	CvCity* pCity;9202	int iProduction;92039204	pCity = pPlot->getPlotCity();92059206	if(pCity == NULL)9207	{9208		return 0;9209	}92109211	iProduction = getMaxHurryProduction(pCity);92129213	iProduction = std::min(pCity->productionLeft(), iProduction);92149215	return std::max(0, iProduction);9216}

Calls

Called by