Bazaar developer reference

CvDiplomacyAI::SetOtherPlayerTurnsSinceKilledProtectedMinor(PlayerTypes, int)

Defined in
CvDiplomacyAI.cpp, line 9997
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_SetOtherPlayerTurnsSinceKilledProtectedMinor

Hooks

static bool BeforeCvDiplomacyAI_SetOtherPlayerTurnsSinceKilledProtectedMinor(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void AfterCvDiplomacyAI_SetOtherPlayerTurnsSinceKilledProtectedMinor(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void ReplaceCvDiplomacyAI_SetOtherPlayerTurnsSinceKilledProtectedMinor(void (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetOtherPlayerTurnsSinceKilledProtectedMinor>(host, &BeforeCvDiplomacyAI_SetOtherPlayerTurnsSinceKilledProtectedMinor);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetOtherPlayerTurnsSinceKilledProtectedMinor>(host, &AfterCvDiplomacyAI_SetOtherPlayerTurnsSinceKilledProtectedMinor);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetOtherPlayerTurnsSinceKilledProtectedMinor>(host, &ReplaceCvDiplomacyAI_SetOtherPlayerTurnsSinceKilledProtectedMinor);

Code

9996/// Sets when the last time ePlayer Killed a Minor we were protecting was9997void CvDiplomacyAI::SetOtherPlayerTurnsSinceKilledProtectedMinor(PlayerTypes ePlayer, int iValue)9998{9999	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");10000	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");10001	CvAssertMsg(iValue >= 0, "DIPLOMACY_AI: Setting number of turns since protected Minor was killed to be negative.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");10002	m_paiOtherPlayerTurnsSinceKilledProtectedMinor[ePlayer] = iValue;10003}

Called by