Bazaar developer reference

CvPlayerPolicies::IsFreePolicy(PolicyTypes) const

Defined in
CvPolicyClasses.cpp, line 2814
Class
CvPlayerPolicies
Hook name
CivHooks::CvPlayerPolicies_IsFreePolicy

Hooks

static bool BeforeCvPlayerPolicies_IsFreePolicy(const CvPlayerPolicies* self, PolicyTypes eIndex, bool& result);static void AfterCvPlayerPolicies_IsFreePolicy(const CvPlayerPolicies* self, PolicyTypes eIndex, bool& result);static bool ReplaceCvPlayerPolicies_IsFreePolicy(bool (*original)(const CvPlayerPolicies*, PolicyTypes), const CvPlayerPolicies* self, PolicyTypes eIndex);CivRegisterBefore<CivHooks::CvPlayerPolicies_IsFreePolicy>(host, &BeforeCvPlayerPolicies_IsFreePolicy);CivRegisterAfter<CivHooks::CvPlayerPolicies_IsFreePolicy>(host, &AfterCvPlayerPolicies_IsFreePolicy);CivRegisterReplace<CivHooks::CvPlayerPolicies_IsFreePolicy>(host, &ReplaceCvPlayerPolicies_IsFreePolicy);

Code

2812#if defined(MOD_API_EXTENSIONS)2813/// Accessor: was this policy given for free2814bool CvPlayerPolicies::IsFreePolicy(PolicyTypes eIndex) const2815{2816	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");2817	CvAssertMsg(eIndex < GC.getNumPolicyInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");2818	return m_pabFreePolicy[eIndex];2819}

Called by