Bazaar developer reference

CvCity::hurry(HurryTypes)

Defined in
CvCity.cpp, line 6052
Class
CvCity
Hook name
CivHooks::CvCity_hurry

Hooks

static bool BeforeCvCity_hurry(CvCity* self, HurryTypes eHurry);static void AfterCvCity_hurry(CvCity* self, HurryTypes eHurry);static void ReplaceCvCity_hurry(void (*original)(CvCity*, HurryTypes), CvCity* self, HurryTypes eHurry);CivRegisterBefore<CivHooks::CvCity_hurry>(host, &BeforeCvCity_hurry);CivRegisterAfter<CivHooks::CvCity_hurry>(host, &AfterCvCity_hurry);CivRegisterReplace<CivHooks::CvCity_hurry>(host, &ReplaceCvCity_hurry);

Code

6052void CvCity::hurry(HurryTypes eHurry)6053{6054	VALIDATE_OBJECT6055	int iHurryGold;6056	int iHurryPopulation;60576058	if(!canHurry(eHurry))6059	{6060		return;6061	}60626063	iHurryGold = hurryGold(eHurry);6064	iHurryPopulation = hurryPopulation(eHurry);60656066	changeProduction(hurryProduction(eHurry));60676068	GET_PLAYER(getOwner()).GetTreasury()->ChangeGold(-(iHurryGold));6069	changePopulation(-(iHurryPopulation));60706071	if((getOwner() == GC.getGame().getActivePlayer()) && isCitySelected())6072	{6073		DLLUI->setDirty(SelectionButtons_DIRTY_BIT, true);6074	}6075}

Calls

Called by