Bazaar developer reference

CvPlayer::HasBelief(BeliefTypes) const

Defined in
CvPlayer.cpp, line 28118
Class
CvPlayer
Hook name
CivHooks::CvPlayer_HasBelief

Hooks

static bool BeforeCvPlayer_HasBelief(const CvPlayer* self, BeliefTypes iBeliefType, bool& result);static void AfterCvPlayer_HasBelief(const CvPlayer* self, BeliefTypes iBeliefType, bool& result);static bool ReplaceCvPlayer_HasBelief(bool (*original)(const CvPlayer*, BeliefTypes), const CvPlayer* self, BeliefTypes iBeliefType);CivRegisterBefore<CivHooks::CvPlayer_HasBelief>(host, &BeforeCvPlayer_HasBelief);CivRegisterAfter<CivHooks::CvPlayer_HasBelief>(host, &AfterCvPlayer_HasBelief);CivRegisterReplace<CivHooks::CvPlayer_HasBelief>(host, &ReplaceCvPlayer_HasBelief);

Code

28118bool CvPlayer::HasBelief(BeliefTypes iBeliefType) const28119{28120	const ReligionTypes iReligion = GetReligions()->GetReligionCreatedByPlayer(true);28121	const CvReligion* pReligion = GC.getGame().GetGameReligions()->GetReligion(iReligion, GetID());2812228123	return (pReligion && pReligion->m_Beliefs.HasBelief(iBeliefType));28124}

Calls

Called by