Bazaar developer reference

CvGameReligions::GetNumReligionsEnhanced() const

Defined in
CvReligionClasses.cpp, line 2052
Class
CvGameReligions
Hook name
CivHooks::CvGameReligions_GetNumReligionsEnhanced

Hooks

static bool BeforeCvGameReligions_GetNumReligionsEnhanced(const CvGameReligions* self, int& result);static void AfterCvGameReligions_GetNumReligionsEnhanced(const CvGameReligions* self, int& result);static int ReplaceCvGameReligions_GetNumReligionsEnhanced(int (*original)(const CvGameReligions*), const CvGameReligions* self);CivRegisterBefore<CivHooks::CvGameReligions_GetNumReligionsEnhanced>(host, &BeforeCvGameReligions_GetNumReligionsEnhanced);CivRegisterAfter<CivHooks::CvGameReligions_GetNumReligionsEnhanced>(host, &AfterCvGameReligions_GetNumReligionsEnhanced);CivRegisterReplace<CivHooks::CvGameReligions_GetNumReligionsEnhanced>(host, &ReplaceCvGameReligions_GetNumReligionsEnhanced);

Code

2051/// Number of religions enhanced so far2052int CvGameReligions::GetNumReligionsEnhanced() const2053{2054	int iRtnValue = 0;20552056	ReligionList::const_iterator it;2057	for(it = m_CurrentReligions.begin(); it != m_CurrentReligions.end(); it++)2058	{2059		if (it->m_bEnhanced)2060		{2061			iRtnValue++;2062		}2063	}20642065	return iRtnValue;2066}

Calls

Called by