Bazaar developer reference

CvDiplomacyAI::GetTurnsSinceTheySupportedOurProposal(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 8205
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetTurnsSinceTheySupportedOurProposal

Hooks

static bool BeforeCvDiplomacyAI_GetTurnsSinceTheySupportedOurProposal(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetTurnsSinceTheySupportedOurProposal(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetTurnsSinceTheySupportedOurProposal(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetTurnsSinceTheySupportedOurProposal>(host, &BeforeCvDiplomacyAI_GetTurnsSinceTheySupportedOurProposal);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetTurnsSinceTheySupportedOurProposal>(host, &AfterCvDiplomacyAI_GetTurnsSinceTheySupportedOurProposal);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetTurnsSinceTheySupportedOurProposal>(host, &ReplaceCvDiplomacyAI_GetTurnsSinceTheySupportedOurProposal);

Code

8204// How long since they supported our proposal to the World Congress?8205int CvDiplomacyAI::GetTurnsSinceTheySupportedOurProposal(PlayerTypes ePlayer)8206{8207	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Anton your save file and version.");8208	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index.  Please send Anton your save file and version.");8209	if (ePlayer < 0 || ePlayer >= MAX_MAJOR_CIVS) return -1;82108211	return m_paiOtherPlayerTurnsSinceTheySupportedOurProposal[ePlayer];8212}

Called by