Bazaar developer reference

CvPlayerPolicies::IsPolicyBranchBlocked(PolicyBranchTypes) const

Defined in
CvPolicyClasses.cpp, line 4035
Class
CvPlayerPolicies
Hook name
CivHooks::CvPlayerPolicies_IsPolicyBranchBlocked

Hooks

static bool BeforeCvPlayerPolicies_IsPolicyBranchBlocked(const CvPlayerPolicies* self, PolicyBranchTypes eBranchType, bool& result);static void AfterCvPlayerPolicies_IsPolicyBranchBlocked(const CvPlayerPolicies* self, PolicyBranchTypes eBranchType, bool& result);static bool ReplaceCvPlayerPolicies_IsPolicyBranchBlocked(bool (*original)(const CvPlayerPolicies*, PolicyBranchTypes), const CvPlayerPolicies* self, PolicyBranchTypes eBranchType);CivRegisterBefore<CivHooks::CvPlayerPolicies_IsPolicyBranchBlocked>(host, &BeforeCvPlayerPolicies_IsPolicyBranchBlocked);CivRegisterAfter<CivHooks::CvPlayerPolicies_IsPolicyBranchBlocked>(host, &AfterCvPlayerPolicies_IsPolicyBranchBlocked);CivRegisterReplace<CivHooks::CvPlayerPolicies_IsPolicyBranchBlocked>(host, &ReplaceCvPlayerPolicies_IsPolicyBranchBlocked);

Code

4034/// Accessor: is eBranchType blocked because of branch choices?4035bool CvPlayerPolicies::IsPolicyBranchBlocked(PolicyBranchTypes eBranchType) const4036{4037	CvAssertMsg(eBranchType >= 0, "eIndex is expected to be non-negative (invalid Index)");4038	CvAssertMsg(eBranchType < m_pPolicies->GetNumPolicyBranches(), "eIndex is expected to be within maximum bounds (invalid Index)");4039	return m_pabPolicyBranchBlocked[eBranchType];4040}

Called by