Bazaar developer reference

CvPlayer::GetFaithPerTurnFromMinor(PlayerTypes) const

Defined in
CvPlayer.cpp, line 11332
Class
CvPlayer
Hook name
CivHooks::CvPlayer_GetFaithPerTurnFromMinor

Hooks

static bool BeforeCvPlayer_GetFaithPerTurnFromMinor(const CvPlayer* self, PlayerTypes eMinor, int& result);static void AfterCvPlayer_GetFaithPerTurnFromMinor(const CvPlayer* self, PlayerTypes eMinor, int& result);static int ReplaceCvPlayer_GetFaithPerTurnFromMinor(int (*original)(const CvPlayer*, PlayerTypes), const CvPlayer* self, PlayerTypes eMinor);CivRegisterBefore<CivHooks::CvPlayer_GetFaithPerTurnFromMinor>(host, &BeforeCvPlayer_GetFaithPerTurnFromMinor);CivRegisterAfter<CivHooks::CvPlayer_GetFaithPerTurnFromMinor>(host, &AfterCvPlayer_GetFaithPerTurnFromMinor);CivRegisterReplace<CivHooks::CvPlayer_GetFaithPerTurnFromMinor>(host, &ReplaceCvPlayer_GetFaithPerTurnFromMinor);

Code

11331/// Faith per turn from a Minor Civ11332int CvPlayer::GetFaithPerTurnFromMinor(PlayerTypes eMinor) const11333{11334	int iFaithPerTurn = 0;1133511336	if(GET_PLAYER(eMinor).isAlive())11337	{11338		iFaithPerTurn += GET_PLAYER(eMinor).GetMinorCivAI()->GetCurrentFaithBonus(GetID());11339	}1134011341	return iFaithPerTurn;11342}

Calls

Called by