Bazaar developer reference

CvDiplomacyAI::GetNumResearchAgreementsWanted() const

Defined in
CvDiplomacyAI.cpp, line 7478
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetNumResearchAgreementsWanted

Hooks

static bool BeforeCvDiplomacyAI_GetNumResearchAgreementsWanted(const CvDiplomacyAI* self, int& result);static void AfterCvDiplomacyAI_GetNumResearchAgreementsWanted(const CvDiplomacyAI* self, int& result);static int ReplaceCvDiplomacyAI_GetNumResearchAgreementsWanted(int (*original)(const CvDiplomacyAI*), const CvDiplomacyAI* self);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetNumResearchAgreementsWanted>(host, &BeforeCvDiplomacyAI_GetNumResearchAgreementsWanted);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetNumResearchAgreementsWanted>(host, &AfterCvDiplomacyAI_GetNumResearchAgreementsWanted);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetNumResearchAgreementsWanted>(host, &ReplaceCvDiplomacyAI_GetNumResearchAgreementsWanted);

Code

7477/// How many different players does this AI want a RA with?7478int CvDiplomacyAI::GetNumResearchAgreementsWanted() const7479{7480	int iNum = 0;74817482	// Loop through all (known) Players7483	PlayerTypes eLoopPlayer;7484	for(int iPlayerLoop = 0; iPlayerLoop < MAX_MAJOR_CIVS; iPlayerLoop++)7485	{7486		eLoopPlayer = (PlayerTypes) iPlayerLoop;74877488		if(IsWantsResearchAgreementWithPlayer(eLoopPlayer))7489			iNum++;7490	}74917492	return iNum;7493}

Calls

Called by