Bazaar developer reference

CvCity::setProjectProductionTimes100(ProjectTypes, int)

Defined in
CvCity.cpp, line 11395
Class
CvCity
Hook name
CivHooks::CvCity_setProjectProductionTimes100

Hooks

static bool BeforeCvCity_setProjectProductionTimes100(CvCity* self, ProjectTypes eIndex, int iNewValue);static void AfterCvCity_setProjectProductionTimes100(CvCity* self, ProjectTypes eIndex, int iNewValue);static void ReplaceCvCity_setProjectProductionTimes100(void (*original)(CvCity*, ProjectTypes, int), CvCity* self, ProjectTypes eIndex, int iNewValue);CivRegisterBefore<CivHooks::CvCity_setProjectProductionTimes100>(host, &BeforeCvCity_setProjectProductionTimes100);CivRegisterAfter<CivHooks::CvCity_setProjectProductionTimes100>(host, &AfterCvCity_setProjectProductionTimes100);CivRegisterReplace<CivHooks::CvCity_setProjectProductionTimes100>(host, &ReplaceCvCity_setProjectProductionTimes100);

Code

11395void CvCity::setProjectProductionTimes100(ProjectTypes eIndex, int iNewValue)11396{11397	VALIDATE_OBJECT11398	CvAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");11399	CvAssertMsg(eIndex < GC.getNumProjectInfos(), "eIndex expected to be < GC.getNumProjectInfos()");1140011401	if(getProjectProductionTimes100(eIndex) != iNewValue)11402	{11403		m_paiProjectProduction.setAt(eIndex, iNewValue);11404		CvAssert(getProjectProductionTimes100(eIndex) >= 0);1140511406		if((getOwner() == GC.getGame().getActivePlayer()) && isCitySelected())11407		{11408			DLLUI->setDirty(CityScreen_DIRTY_BIT, true);11409		}1141011411		auto_ptr<ICvCity1> pCity = GC.WrapCityPointer(this);11412		DLLUI->SetSpecificCityInfoDirty(pCity.get(), CITY_UPDATE_TYPE_BANNER);11413	}11414}

Calls

Called by