CvDiplomacyAI::SetOtherPlayerNumProtectedMinorsAttacked(PlayerTypes, int)
- Defined in
- CvDiplomacyAI.cpp, line 9970
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_SetOtherPlayerNumProtectedMinorsAttacked
Hooks
static bool BeforeCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsAttacked(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void AfterCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsAttacked(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void ReplaceCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsAttacked(void (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetOtherPlayerNumProtectedMinorsAttacked>(host, &BeforeCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsAttacked);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetOtherPlayerNumProtectedMinorsAttacked>(host, &AfterCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsAttacked);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetOtherPlayerNumProtectedMinorsAttacked>(host, &ReplaceCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsAttacked);
Code
9969/// Sets how many ProtectedMinors have we seen this Player attack9970void CvDiplomacyAI::SetOtherPlayerNumProtectedMinorsAttacked(PlayerTypes ePlayer, int iValue)9971{9972 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");9973 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.");9974 CvAssertMsg(iValue >= 0, "DIPLOMACY_AI: Setting number of protected Minors to be negative. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");9975 m_paiOtherPlayerNumProtectedMinorsAttacked[ePlayer] = iValue;9976}