Bazaar developer reference

CvCity::setSpecialistProductionTimes100(SpecialistTypes, int)

Defined in
CvCity.cpp, line 11463
Class
CvCity
Hook name
CivHooks::CvCity_setSpecialistProductionTimes100

Hooks

static bool BeforeCvCity_setSpecialistProductionTimes100(CvCity* self, SpecialistTypes eIndex, int iNewValue);static void AfterCvCity_setSpecialistProductionTimes100(CvCity* self, SpecialistTypes eIndex, int iNewValue);static void ReplaceCvCity_setSpecialistProductionTimes100(void (*original)(CvCity*, SpecialistTypes, int), CvCity* self, SpecialistTypes eIndex, int iNewValue);CivRegisterBefore<CivHooks::CvCity_setSpecialistProductionTimes100>(host, &BeforeCvCity_setSpecialistProductionTimes100);CivRegisterAfter<CivHooks::CvCity_setSpecialistProductionTimes100>(host, &AfterCvCity_setSpecialistProductionTimes100);CivRegisterReplace<CivHooks::CvCity_setSpecialistProductionTimes100>(host, &ReplaceCvCity_setSpecialistProductionTimes100);

Code

11463void CvCity::setSpecialistProductionTimes100(SpecialistTypes eIndex, int iNewValue)11464{11465	VALIDATE_OBJECT11466	CvAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");11467	CvAssertMsg(eIndex < GC.getNumSpecialistInfos(), "eIndex expected to be < GC.getNumSpecialistInfos()");1146811469	if(getSpecialistProductionTimes100(eIndex) != iNewValue)11470	{11471		m_paiSpecialistProduction.setAt(eIndex, iNewValue);11472		CvAssert(getSpecialistProductionTimes100(eIndex) >= 0);1147311474		if((getOwner() == GC.getGame().getActivePlayer()) && isCitySelected())11475		{11476			DLLUI->setDirty(CityScreen_DIRTY_BIT, true);11477		}1147811479		auto_ptr<ICvCity1> pCity = GC.WrapCityPointer(this);11480		DLLUI->SetSpecificCityInfoDirty(pCity.get(), CITY_UPDATE_TYPE_BANNER);11481	}11482}

Calls

Called by