Bazaar developer reference

CvPlayer::GetFaithPerTurnFromCities() const

Defined in
CvPlayer.cpp, line 11303
Class
CvPlayer
Hook name
CivHooks::CvPlayer_GetFaithPerTurnFromCities

Hooks

static bool BeforeCvPlayer_GetFaithPerTurnFromCities(const CvPlayer* self, int& result);static void AfterCvPlayer_GetFaithPerTurnFromCities(const CvPlayer* self, int& result);static int ReplaceCvPlayer_GetFaithPerTurnFromCities(int (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_GetFaithPerTurnFromCities>(host, &BeforeCvPlayer_GetFaithPerTurnFromCities);CivRegisterAfter<CivHooks::CvPlayer_GetFaithPerTurnFromCities>(host, &AfterCvPlayer_GetFaithPerTurnFromCities);CivRegisterReplace<CivHooks::CvPlayer_GetFaithPerTurnFromCities>(host, &ReplaceCvPlayer_GetFaithPerTurnFromCities);

Code

11302/// Faith per turn from Cities11303int CvPlayer::GetFaithPerTurnFromCities() const11304{11305	int iFaithPerTurn = 0;1130611307	// Add in culture from Cities11308	const CvCity* pLoopCity;11309	int iLoop;11310	for(pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))11311	{11312		iFaithPerTurn += pLoopCity->GetFaithPerTurn();11313	}1131411315	return iFaithPerTurn;11316}

Calls

Called by