Bazaar developer reference

CvDiplomacyAI::GetTurnsSinceTheyFoiledOurProposal(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 8229
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetTurnsSinceTheyFoiledOurProposal

Hooks

static bool BeforeCvDiplomacyAI_GetTurnsSinceTheyFoiledOurProposal(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetTurnsSinceTheyFoiledOurProposal(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetTurnsSinceTheyFoiledOurProposal(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetTurnsSinceTheyFoiledOurProposal>(host, &BeforeCvDiplomacyAI_GetTurnsSinceTheyFoiledOurProposal);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetTurnsSinceTheyFoiledOurProposal>(host, &AfterCvDiplomacyAI_GetTurnsSinceTheyFoiledOurProposal);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetTurnsSinceTheyFoiledOurProposal>(host, &ReplaceCvDiplomacyAI_GetTurnsSinceTheyFoiledOurProposal);

Code

8228// How long since they foiled our proposal to the World Congress?8229int CvDiplomacyAI::GetTurnsSinceTheyFoiledOurProposal(PlayerTypes ePlayer)8230{8231	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Anton your save file and version.");8232	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index.  Please send Anton your save file and version.");8233	if (ePlayer < 0 || ePlayer >= MAX_MAJOR_CIVS) return -1;82348235	return m_paiOtherPlayerTurnsSinceTheyFoiledOurProposal[ePlayer];8236}

Called by