Bazaar developer reference

CvPlayerPolicies::GetPolicyBranchChosen(int) const

Defined in
CvPolicyClasses.cpp, line 4264
Class
CvPlayerPolicies
Hook name
CivHooks::CvPlayerPolicies_GetPolicyBranchChosen

Hooks

static bool BeforeCvPlayerPolicies_GetPolicyBranchChosen(const CvPlayerPolicies* self, int iID, PolicyBranchTypes& result);static void AfterCvPlayerPolicies_GetPolicyBranchChosen(const CvPlayerPolicies* self, int iID, PolicyBranchTypes& result);static PolicyBranchTypes ReplaceCvPlayerPolicies_GetPolicyBranchChosen(PolicyBranchTypes (*original)(const CvPlayerPolicies*, int), const CvPlayerPolicies* self, int iID);CivRegisterBefore<CivHooks::CvPlayerPolicies_GetPolicyBranchChosen>(host, &BeforeCvPlayerPolicies_GetPolicyBranchChosen);CivRegisterAfter<CivHooks::CvPlayerPolicies_GetPolicyBranchChosen>(host, &AfterCvPlayerPolicies_GetPolicyBranchChosen);CivRegisterReplace<CivHooks::CvPlayerPolicies_GetPolicyBranchChosen>(host, &ReplaceCvPlayerPolicies_GetPolicyBranchChosen);

Code

4263/// What Policy Branches has the player chosen to adopt?4264PolicyBranchTypes CvPlayerPolicies::GetPolicyBranchChosen(int iID) const4265{4266	if(iID < GetNumPolicyBranchesAllowed())4267	{4268		return m_paePolicyBranchesChosen[iID];4269	}42704271	FAssert(false);42724273	return NO_POLICY_BRANCH_TYPE;4274}

Calls

Called by