Bazaar developer reference

CvPlayerPolicies::HasOneShotPolicyFired(PolicyTypes) const

Defined in
CvPolicyClasses.cpp, line 2915
Class
CvPlayerPolicies
Hook name
CivHooks::CvPlayerPolicies_HasOneShotPolicyFired

Hooks

static bool BeforeCvPlayerPolicies_HasOneShotPolicyFired(const CvPlayerPolicies* self, PolicyTypes eIndex, bool& result);static void AfterCvPlayerPolicies_HasOneShotPolicyFired(const CvPlayerPolicies* self, PolicyTypes eIndex, bool& result);static bool ReplaceCvPlayerPolicies_HasOneShotPolicyFired(bool (*original)(const CvPlayerPolicies*, PolicyTypes), const CvPlayerPolicies* self, PolicyTypes eIndex);CivRegisterBefore<CivHooks::CvPlayerPolicies_HasOneShotPolicyFired>(host, &BeforeCvPlayerPolicies_HasOneShotPolicyFired);CivRegisterAfter<CivHooks::CvPlayerPolicies_HasOneShotPolicyFired>(host, &AfterCvPlayerPolicies_HasOneShotPolicyFired);CivRegisterReplace<CivHooks::CvPlayerPolicies_HasOneShotPolicyFired>(host, &ReplaceCvPlayerPolicies_HasOneShotPolicyFired);

Code

2914/// Accessor: is a one-shot policy spent?2915bool CvPlayerPolicies::HasOneShotPolicyFired(PolicyTypes eIndex) const2916{2917	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");2918	CvAssertMsg(eIndex < GC.getNumPolicyInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");2919	return m_pabHasOneShotPolicyFired[eIndex];2920}

Called by