Bazaar developer reference

CvDiplomacyAI::SetOtherPlayerTurnsSinceSidedWithProtectedMinor(PlayerTypes, int)

Defined in
CvDiplomacyAI.cpp, line 10139
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_SetOtherPlayerTurnsSinceSidedWithProtectedMinor

Hooks

static bool BeforeCvDiplomacyAI_SetOtherPlayerTurnsSinceSidedWithProtectedMinor(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void AfterCvDiplomacyAI_SetOtherPlayerTurnsSinceSidedWithProtectedMinor(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void ReplaceCvDiplomacyAI_SetOtherPlayerTurnsSinceSidedWithProtectedMinor(void (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetOtherPlayerTurnsSinceSidedWithProtectedMinor>(host, &BeforeCvDiplomacyAI_SetOtherPlayerTurnsSinceSidedWithProtectedMinor);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetOtherPlayerTurnsSinceSidedWithProtectedMinor>(host, &AfterCvDiplomacyAI_SetOtherPlayerTurnsSinceSidedWithProtectedMinor);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetOtherPlayerTurnsSinceSidedWithProtectedMinor>(host, &ReplaceCvDiplomacyAI_SetOtherPlayerTurnsSinceSidedWithProtectedMinor);

Code

10139void CvDiplomacyAI::SetOtherPlayerTurnsSinceSidedWithProtectedMinor(PlayerTypes ePlayer, int iValue)10140{10141	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Anton your save file and version.");10142	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index.  Please send Anton your save file and version.");10143	if (ePlayer < 0 || ePlayer >= MAX_MAJOR_CIVS) return;1014410145	m_paiOtherPlayerTurnsSinceSidedWithTheirProtectedMinor[ePlayer] = iValue;10146}

Called by