Bazaar developer reference

CvCityReligions::GetNumReligionsWithFollowers()

Defined in
CvReligionClasses.cpp, line 3441
Class
CvCityReligions
Hook name
CivHooks::CvCityReligions_GetNumReligionsWithFollowers

Hooks

static bool BeforeCvCityReligions_GetNumReligionsWithFollowers(CvCityReligions* self, int& result);static void AfterCvCityReligions_GetNumReligionsWithFollowers(CvCityReligions* self, int& result);static int ReplaceCvCityReligions_GetNumReligionsWithFollowers(int (*original)(CvCityReligions*), CvCityReligions* self);CivRegisterBefore<CivHooks::CvCityReligions_GetNumReligionsWithFollowers>(host, &BeforeCvCityReligions_GetNumReligionsWithFollowers);CivRegisterAfter<CivHooks::CvCityReligions_GetNumReligionsWithFollowers>(host, &AfterCvCityReligions_GetNumReligionsWithFollowers);CivRegisterReplace<CivHooks::CvCityReligions_GetNumReligionsWithFollowers>(host, &ReplaceCvCityReligions_GetNumReligionsWithFollowers);

Code

3440/// How many religions have at least 1 follower?3441int CvCityReligions::GetNumReligionsWithFollowers()3442{3443	int iRtnValue = 0;3444	ReligionInCityList::iterator religionIt;34453446	// Find the religion in the list3447	for(religionIt = m_ReligionStatus.begin(); religionIt != m_ReligionStatus.end(); ++religionIt)3448	{3449		if(religionIt->m_iFollowers > 0 && religionIt->m_eReligion > RELIGION_PANTHEON)3450		{3451			iRtnValue++;3452		}3453	}34543455	return iRtnValue;3456}

Calls

Called by