Bazaar developer reference

CvDiplomacyAI::SetWantsResearchAgreementWithPlayer(PlayerTypes, bool)

Defined in
CvDiplomacyAI.cpp, line 7470
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_SetWantsResearchAgreementWithPlayer

Hooks

static bool BeforeCvDiplomacyAI_SetWantsResearchAgreementWithPlayer(CvDiplomacyAI* self, PlayerTypes ePlayer, bool bValue);static void AfterCvDiplomacyAI_SetWantsResearchAgreementWithPlayer(CvDiplomacyAI* self, PlayerTypes ePlayer, bool bValue);static void ReplaceCvDiplomacyAI_SetWantsResearchAgreementWithPlayer(void (*original)(CvDiplomacyAI*, PlayerTypes, bool), CvDiplomacyAI* self, PlayerTypes ePlayer, bool bValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetWantsResearchAgreementWithPlayer>(host, &BeforeCvDiplomacyAI_SetWantsResearchAgreementWithPlayer);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetWantsResearchAgreementWithPlayer>(host, &AfterCvDiplomacyAI_SetWantsResearchAgreementWithPlayer);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetWantsResearchAgreementWithPlayer>(host, &ReplaceCvDiplomacyAI_SetWantsResearchAgreementWithPlayer);

Code

7469/// Sets this AI want to want a Research Agreement with ePlayer7470void CvDiplomacyAI::SetWantsResearchAgreementWithPlayer(PlayerTypes ePlayer, bool bValue)7471{7472	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");7473	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");7474	m_pabWantsResearchAgreementWithPlayer[ePlayer] = bValue;7475}

Called by