Bazaar developer reference

CvPlayerReligions::GetNumProphetsSpawned(bool) const

Defined in
CvReligionClasses.cpp, line 2963
Class
CvPlayerReligions
Hook name
CivHooks::CvPlayerReligions_GetNumProphetsSpawned

Hooks

static bool BeforeCvPlayerReligions_GetNumProphetsSpawned(const CvPlayerReligions* self, bool bExcludeFree, int& result);static void AfterCvPlayerReligions_GetNumProphetsSpawned(const CvPlayerReligions* self, bool bExcludeFree, int& result);static int ReplaceCvPlayerReligions_GetNumProphetsSpawned(int (*original)(const CvPlayerReligions*, bool), const CvPlayerReligions* self, bool bExcludeFree);CivRegisterBefore<CivHooks::CvPlayerReligions_GetNumProphetsSpawned>(host, &BeforeCvPlayerReligions_GetNumProphetsSpawned);CivRegisterAfter<CivHooks::CvPlayerReligions_GetNumProphetsSpawned>(host, &AfterCvPlayerReligions_GetNumProphetsSpawned);CivRegisterReplace<CivHooks::CvPlayerReligions_GetNumProphetsSpawned>(host, &ReplaceCvPlayerReligions_GetNumProphetsSpawned);

Code

2961/// How many prophets have we spawned2962#if defined(MOD_GLOBAL_TRULY_FREE_GP)2963int CvPlayerReligions::GetNumProphetsSpawned(bool bExcludeFree) const2964#else2965int CvPlayerReligions::GetNumProphetsSpawned() const2966#endif2967{2968#if defined(MOD_GLOBAL_TRULY_FREE_GP)2969	int iCount = m_iNumProphetsSpawned;2970	if (bExcludeFree) iCount -= m_iNumFreeProphetsSpawned;2971	return iCount;2972#else2973	return m_iNumProphetsSpawned;2974#endif2975}

Called by