Bazaar developer reference

CvCityCitizens::DoVerifyWorkingPlot(CvPlot *)

Defined in
CvCityCitizens.cpp, line 2104
Class
CvCityCitizens
Hook name
CivHooks::CvCityCitizens_DoVerifyWorkingPlot

Hooks

static bool BeforeCvCityCitizens_DoVerifyWorkingPlot(CvCityCitizens* self, CvPlot* pPlot);static void AfterCvCityCitizens_DoVerifyWorkingPlot(CvCityCitizens* self, CvPlot* pPlot);static void ReplaceCvCityCitizens_DoVerifyWorkingPlot(void (*original)(CvCityCitizens*, CvPlot*), CvCityCitizens* self, CvPlot* pPlot);CivRegisterBefore<CivHooks::CvCityCitizens_DoVerifyWorkingPlot>(host, &BeforeCvCityCitizens_DoVerifyWorkingPlot);CivRegisterAfter<CivHooks::CvCityCitizens_DoVerifyWorkingPlot>(host, &AfterCvCityCitizens_DoVerifyWorkingPlot);CivRegisterReplace<CivHooks::CvCityCitizens_DoVerifyWorkingPlot>(host, &ReplaceCvCityCitizens_DoVerifyWorkingPlot);

Code

2103/// If we're working this plot make sure we're allowed, and if we're not then correct the situation2104void CvCityCitizens::DoVerifyWorkingPlot(CvPlot* pPlot)2105{2106	if(pPlot != NULL)2107	{2108		if(IsWorkingPlot(pPlot))2109		{2110			if(!IsCanWork(pPlot))2111			{2112				SetWorkingPlot(pPlot, false);2113				DoAddBestCitizenFromUnassigned();2114			}2115		}2116	}2117}

Calls

Called by