CvDiplomacyAI::SetOtherPlayerTurnsSinceAttackedProtectedMinor(PlayerTypes, int)
- Defined in
- CvDiplomacyAI.cpp, line 9929
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_SetOtherPlayerTurnsSinceAttackedProtectedMinor
Hooks
static bool BeforeCvDiplomacyAI_SetOtherPlayerTurnsSinceAttackedProtectedMinor(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void AfterCvDiplomacyAI_SetOtherPlayerTurnsSinceAttackedProtectedMinor(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void ReplaceCvDiplomacyAI_SetOtherPlayerTurnsSinceAttackedProtectedMinor(void (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetOtherPlayerTurnsSinceAttackedProtectedMinor>(host, &BeforeCvDiplomacyAI_SetOtherPlayerTurnsSinceAttackedProtectedMinor);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetOtherPlayerTurnsSinceAttackedProtectedMinor>(host, &AfterCvDiplomacyAI_SetOtherPlayerTurnsSinceAttackedProtectedMinor);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetOtherPlayerTurnsSinceAttackedProtectedMinor>(host, &ReplaceCvDiplomacyAI_SetOtherPlayerTurnsSinceAttackedProtectedMinor);
Code
9928/// Sets when the last time ePlayer attacked a Minor we were protecting was9929void CvDiplomacyAI::SetOtherPlayerTurnsSinceAttackedProtectedMinor(PlayerTypes ePlayer, int iValue)9930{9931 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");9932 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.");9933 CvAssertMsg(iValue >= 0, "DIPLOMACY_AI: Setting OtherPlayerTurnsSinceAttackedProtectedMinor to a negative value. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");9934 m_paiOtherPlayerTurnsSinceAttackedProtectedMinor[ePlayer] = iValue;9935}