Bazaar developer reference

CvGameReligions::GetNumPantheonsCreated() const

Defined in
CvReligionClasses.cpp, line 1747
Class
CvGameReligions
Hook name
CivHooks::CvGameReligions_GetNumPantheonsCreated

Hooks

static bool BeforeCvGameReligions_GetNumPantheonsCreated(const CvGameReligions* self, int& result);static void AfterCvGameReligions_GetNumPantheonsCreated(const CvGameReligions* self, int& result);static int ReplaceCvGameReligions_GetNumPantheonsCreated(int (*original)(const CvGameReligions*), const CvGameReligions* self);CivRegisterBefore<CivHooks::CvGameReligions_GetNumPantheonsCreated>(host, &BeforeCvGameReligions_GetNumPantheonsCreated);CivRegisterAfter<CivHooks::CvGameReligions_GetNumPantheonsCreated>(host, &AfterCvGameReligions_GetNumPantheonsCreated);CivRegisterReplace<CivHooks::CvGameReligions_GetNumPantheonsCreated>(host, &ReplaceCvGameReligions_GetNumPantheonsCreated);

Code

1746/// How many players have created a pantheon?1747int CvGameReligions::GetNumPantheonsCreated() const1748{1749	int iRtnValue = 0;17501751	for(int iI = 0; iI < MAX_MAJOR_CIVS; iI++)1752	{1753		ReligionList::const_iterator it;1754		for(it = m_CurrentReligions.begin(); it != m_CurrentReligions.end(); it++)1755		{1756			if (it->m_eFounder == iI)1757			{1758				iRtnValue++;1759				break;1760			}1761		}1762	}17631764	return iRtnValue;1765}

Calls

Called by