Bazaar developer reference

CvGameReligions::GetFaithGreatProphetNumber(int) const

Defined in
CvReligionClasses.cpp, line 2476
Class
CvGameReligions
Hook name
CivHooks::CvGameReligions_GetFaithGreatProphetNumber

Hooks

static bool BeforeCvGameReligions_GetFaithGreatProphetNumber(const CvGameReligions* self, int iNum, int& result);static void AfterCvGameReligions_GetFaithGreatProphetNumber(const CvGameReligions* self, int iNum, int& result);static int ReplaceCvGameReligions_GetFaithGreatProphetNumber(int (*original)(const CvGameReligions*, int), const CvGameReligions* self, int iNum);CivRegisterBefore<CivHooks::CvGameReligions_GetFaithGreatProphetNumber>(host, &BeforeCvGameReligions_GetFaithGreatProphetNumber);CivRegisterAfter<CivHooks::CvGameReligions_GetFaithGreatProphetNumber>(host, &AfterCvGameReligions_GetFaithGreatProphetNumber);CivRegisterReplace<CivHooks::CvGameReligions_GetFaithGreatProphetNumber>(host, &ReplaceCvGameReligions_GetFaithGreatProphetNumber);

Code

2475/// How much does this prophet cost (recursive)2476int CvGameReligions::GetFaithGreatProphetNumber(int iNum) const2477{2478	int iRtnValue = 0;24792480	if(iNum >= 1)2481	{2482		if(iNum == 1)2483		{2484			iRtnValue = GC.getRELIGION_MIN_FAITH_FIRST_PROPHET();2485		}2486		else2487		{2488			iRtnValue = (GC.getRELIGION_FAITH_DELTA_NEXT_PROPHET() * (iNum - 1)) + GetFaithGreatProphetNumber(iNum - 1);2489		}2490	}24912492	return iRtnValue;2493}

Calls

Called by