Bazaar developer reference

CvCity::processSpecialist(SpecialistTypes, int)

Defined in
CvCity.cpp, line 6885
Class
CvCity
Hook name
CivHooks::CvCity_processSpecialist

Hooks

static bool BeforeCvCity_processSpecialist(CvCity* self, SpecialistTypes eSpecialist, int iChange);static void AfterCvCity_processSpecialist(CvCity* self, SpecialistTypes eSpecialist, int iChange);static void ReplaceCvCity_processSpecialist(void (*original)(CvCity*, SpecialistTypes, int), CvCity* self, SpecialistTypes eSpecialist, int iChange);CivRegisterBefore<CivHooks::CvCity_processSpecialist>(host, &BeforeCvCity_processSpecialist);CivRegisterAfter<CivHooks::CvCity_processSpecialist>(host, &AfterCvCity_processSpecialist);CivRegisterReplace<CivHooks::CvCity_processSpecialist>(host, &ReplaceCvCity_processSpecialist);

Code

6885void CvCity::processSpecialist(SpecialistTypes eSpecialist, int iChange)6886{6887	VALIDATE_OBJECT6888	int iI;68896890	CvSpecialistInfo* pkSpecialist = GC.getSpecialistInfo(eSpecialist);6891	if(pkSpecialist == NULL)6892	{6893		//This function requires a valid specialist type.6894		return;6895	}68966897	changeBaseGreatPeopleRate(pkSpecialist->getGreatPeopleRateChange() * iChange);68986899	for(iI = 0; iI < NUM_YIELD_TYPES; iI++)6900	{6901		ChangeBaseYieldRateFromSpecialists(((YieldTypes)iI), (pkSpecialist->getYieldChange(iI) * iChange));6902	}69036904	updateExtraSpecialistYield();69056906	changeSpecialistFreeExperience(pkSpecialist->getExperience() * iChange);69076908	// Culture6909	int iCulturePerSpecialist = GetCultureFromSpecialist(eSpecialist);6910	ChangeJONSCulturePerTurnFromSpecialists(iCulturePerSpecialist * iChange);6911}

Calls

Called by