Bazaar developer reference

CvPlayerPolicies::IsPolicyBranchUnlocked(PolicyBranchTypes) const

Defined in
CvPolicyClasses.cpp, line 3783
Class
CvPlayerPolicies
Hook name
CivHooks::CvPlayerPolicies_IsPolicyBranchUnlocked

Hooks

static bool BeforeCvPlayerPolicies_IsPolicyBranchUnlocked(const CvPlayerPolicies* self, PolicyBranchTypes eBranchType, bool& result);static void AfterCvPlayerPolicies_IsPolicyBranchUnlocked(const CvPlayerPolicies* self, PolicyBranchTypes eBranchType, bool& result);static bool ReplaceCvPlayerPolicies_IsPolicyBranchUnlocked(bool (*original)(const CvPlayerPolicies*, PolicyBranchTypes), const CvPlayerPolicies* self, PolicyBranchTypes eBranchType);CivRegisterBefore<CivHooks::CvPlayerPolicies_IsPolicyBranchUnlocked>(host, &BeforeCvPlayerPolicies_IsPolicyBranchUnlocked);CivRegisterAfter<CivHooks::CvPlayerPolicies_IsPolicyBranchUnlocked>(host, &AfterCvPlayerPolicies_IsPolicyBranchUnlocked);CivRegisterReplace<CivHooks::CvPlayerPolicies_IsPolicyBranchUnlocked>(host, &ReplaceCvPlayerPolicies_IsPolicyBranchUnlocked);

Code

3782/// Accessor: has a player unlocked eBranchType to pick Policies from?3783bool CvPlayerPolicies::IsPolicyBranchUnlocked(PolicyBranchTypes eBranchType) const3784{3785	CvAssertMsg(eBranchType >= 0, "eIndex is expected to be non-negative (invalid Index)");3786	CvAssertMsg(eBranchType < m_pPolicies->GetNumPolicyBranches(), "eIndex is expected to be within maximum bounds (invalid Index)");3787	return m_pabPolicyBranchUnlocked[eBranchType];3788}

Called by