Bazaar developer reference

CvPlayerPolicies::IsEraPrereqBranch(PolicyBranchTypes)

Defined in
CvPolicyClasses.cpp, line 3774
Class
CvPlayerPolicies
Hook name
CivHooks::CvPlayerPolicies_IsEraPrereqBranch

Hooks

static bool BeforeCvPlayerPolicies_IsEraPrereqBranch(CvPlayerPolicies* self, PolicyBranchTypes eBranchType, bool& result);static void AfterCvPlayerPolicies_IsEraPrereqBranch(CvPlayerPolicies* self, PolicyBranchTypes eBranchType, bool& result);static bool ReplaceCvPlayerPolicies_IsEraPrereqBranch(bool (*original)(CvPlayerPolicies*, PolicyBranchTypes), CvPlayerPolicies* self, PolicyBranchTypes eBranchType);CivRegisterBefore<CivHooks::CvPlayerPolicies_IsEraPrereqBranch>(host, &BeforeCvPlayerPolicies_IsEraPrereqBranch);CivRegisterAfter<CivHooks::CvPlayerPolicies_IsEraPrereqBranch>(host, &AfterCvPlayerPolicies_IsEraPrereqBranch);CivRegisterReplace<CivHooks::CvPlayerPolicies_IsEraPrereqBranch>(host, &ReplaceCvPlayerPolicies_IsEraPrereqBranch);

Code

3772#if defined(MOD_AI_SMART_V3)3773/// can the player unlock eBranchType right now?3774bool CvPlayerPolicies::IsEraPrereqBranch(PolicyBranchTypes eBranchType)3775{3776	CvPolicyBranchEntry* pkBranchEntry = m_pPolicies->GetPolicyBranchEntry(eBranchType);37773778	return (pkBranchEntry && pkBranchEntry->GetEraPrereq() > 0);3779}

Calls

Called by