Bazaar developer reference

CvUnit::GetSpreadReligionTargetCity() const

Defined in
CvUnit.cpp, line 8920
Class
CvUnit
Hook name
CivHooks::CvUnit_GetSpreadReligionTargetCity

Hooks

static bool BeforeCvUnit_GetSpreadReligionTargetCity(const CvUnit* self, CvCity *& result);static void AfterCvUnit_GetSpreadReligionTargetCity(const CvUnit* self, CvCity *& result);static CvCity * ReplaceCvUnit_GetSpreadReligionTargetCity(CvCity * (*original)(const CvUnit*), const CvUnit* self);CivRegisterBefore<CivHooks::CvUnit_GetSpreadReligionTargetCity>(host, &BeforeCvUnit_GetSpreadReligionTargetCity);CivRegisterAfter<CivHooks::CvUnit_GetSpreadReligionTargetCity>(host, &AfterCvUnit_GetSpreadReligionTargetCity);CivRegisterReplace<CivHooks::CvUnit_GetSpreadReligionTargetCity>(host, &ReplaceCvUnit_GetSpreadReligionTargetCity);

Code

8920CvCity *CvUnit::GetSpreadReligionTargetCity() const8921{8922	CvCity* pCity = NULL;8923	CvPlot* pPlot = plot();89248925	if(pPlot)8926	{8927		pCity = pPlot->getPlotCity();8928		if(pCity == NULL)8929		{8930			pCity = pPlot->GetAdjacentCity();8931			if(pCity == NULL)8932			{8933				return NULL;8934			}8935		}8936	}8937	return pCity;8938}

Calls

Called by