Bazaar developer reference

CvDiplomacyAI::GetTurnsSinceWeLikedTheirProposal(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 8157
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetTurnsSinceWeLikedTheirProposal

Hooks

static bool BeforeCvDiplomacyAI_GetTurnsSinceWeLikedTheirProposal(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetTurnsSinceWeLikedTheirProposal(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetTurnsSinceWeLikedTheirProposal(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetTurnsSinceWeLikedTheirProposal>(host, &BeforeCvDiplomacyAI_GetTurnsSinceWeLikedTheirProposal);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetTurnsSinceWeLikedTheirProposal>(host, &AfterCvDiplomacyAI_GetTurnsSinceWeLikedTheirProposal);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetTurnsSinceWeLikedTheirProposal>(host, &ReplaceCvDiplomacyAI_GetTurnsSinceWeLikedTheirProposal);

Code

8156// How long since we really liked this player's proposal to the World Congress?8157int CvDiplomacyAI::GetTurnsSinceWeLikedTheirProposal(PlayerTypes ePlayer)8158{8159	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Anton your save file and version.");8160	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index.  Please send Anton your save file and version.");8161	if (ePlayer < 0 || ePlayer >= MAX_MAJOR_CIVS) return -1;81628163	return m_paiOtherPlayerTurnsSinceWeLikedTheirProposal[ePlayer];8164}

Called by