Bazaar developer reference

CvPlayerReligions::HasReligiousCity() const

Defined in
CvReligionClasses.cpp, line 3154
Class
CvPlayerReligions
Hook name
CivHooks::CvPlayerReligions_HasReligiousCity

Hooks

static bool BeforeCvPlayerReligions_HasReligiousCity(const CvPlayerReligions* self, bool& result);static void AfterCvPlayerReligions_HasReligiousCity(const CvPlayerReligions* self, bool& result);static bool ReplaceCvPlayerReligions_HasReligiousCity(bool (*original)(const CvPlayerReligions*), const CvPlayerReligions* self);CivRegisterBefore<CivHooks::CvPlayerReligions_HasReligiousCity>(host, &BeforeCvPlayerReligions_HasReligiousCity);CivRegisterAfter<CivHooks::CvPlayerReligions_HasReligiousCity>(host, &AfterCvPlayerReligions_HasReligiousCity);CivRegisterReplace<CivHooks::CvPlayerReligions_HasReligiousCity>(host, &ReplaceCvPlayerReligions_HasReligiousCity);

Code

3153/// Does this player have a city following a religion?3154bool CvPlayerReligions::HasReligiousCity() const3155{3156	int iLoop = 0;3157	CvCity* pCity = NULL;31583159	for(pCity = m_pPlayer->firstCity(&iLoop); pCity != NULL; pCity = m_pPlayer->nextCity(&iLoop))3160	{3161		if(pCity)3162		{3163			if(pCity->GetCityReligions()->GetReligiousMajority() > RELIGION_PANTHEON)3164			{3165				return true;3166			}3167		}3168	}31693170	return false;3171}

Calls