Bazaar developer reference

CvPlayerPolicies::CanAdoptIdeology(PolicyBranchTypes) const

Defined in
CvPolicyClasses.cpp, line 4057
Class
CvPlayerPolicies
Hook name
CivHooks::CvPlayerPolicies_CanAdoptIdeology
Lua events
GameEvents.PlayerCanAdoptTenet

Hooks

static bool BeforeCvPlayerPolicies_CanAdoptIdeology(const CvPlayerPolicies* self, PolicyBranchTypes eIdeology, bool& result);static void AfterCvPlayerPolicies_CanAdoptIdeology(const CvPlayerPolicies* self, PolicyBranchTypes eIdeology, bool& result);static bool ReplaceCvPlayerPolicies_CanAdoptIdeology(bool (*original)(const CvPlayerPolicies*, PolicyBranchTypes), const CvPlayerPolicies* self, PolicyBranchTypes eIdeology);CivRegisterBefore<CivHooks::CvPlayerPolicies_CanAdoptIdeology>(host, &BeforeCvPlayerPolicies_CanAdoptIdeology);CivRegisterAfter<CivHooks::CvPlayerPolicies_CanAdoptIdeology>(host, &AfterCvPlayerPolicies_CanAdoptIdeology);CivRegisterReplace<CivHooks::CvPlayerPolicies_CanAdoptIdeology>(host, &ReplaceCvPlayerPolicies_CanAdoptIdeology);

Code

4056#if defined(MOD_API_EXTENSIONS)4057bool CvPlayerPolicies::CanAdoptIdeology(PolicyBranchTypes eIdeology) const4058{4059#if defined(MOD_EVENTS_IDEOLOGIES)4060	if (MOD_EVENTS_IDEOLOGIES) {4061		if (GAMEEVENTINVOKE_TESTALL(GAMEEVENT_PlayerCanAdoptTenet, m_pPlayer->GetID(), eIdeology) == GAMEEVENTRETURN_FALSE) {4062			return false;4063		}4064	}4065#endif40664067	return true;4068}

Calls

Called by