CvDiplomacyAI::GetOtherPlayerNumMinorsAttacked(PlayerTypes) const
- Defined in
- CvDiplomacyAI.cpp, line 10158
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_GetOtherPlayerNumMinorsAttacked
Hooks
static bool BeforeCvDiplomacyAI_GetOtherPlayerNumMinorsAttacked(const CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetOtherPlayerNumMinorsAttacked(const CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetOtherPlayerNumMinorsAttacked(int (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetOtherPlayerNumMinorsAttacked>(host, &BeforeCvDiplomacyAI_GetOtherPlayerNumMinorsAttacked);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetOtherPlayerNumMinorsAttacked>(host, &AfterCvDiplomacyAI_GetOtherPlayerNumMinorsAttacked);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetOtherPlayerNumMinorsAttacked>(host, &ReplaceCvDiplomacyAI_GetOtherPlayerNumMinorsAttacked);
Code
10157/// How many Minors have we seen this Player attack10158int CvDiplomacyAI::GetOtherPlayerNumMinorsAttacked(PlayerTypes ePlayer) const10159{10160 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");10161 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.");10162 return m_paiOtherPlayerNumMinorsAttacked[ePlayer];10163}
Called by
- CvDiplomacyAI::ChangeOtherPlayerNumMinorsAttacked(PlayerTypes, int)
- CvDiplomacyAI::DoUpdateEstimateOtherPlayerMilitaryThreats()
- CvDiplomacyAI::DoUpdateMilitaryThreats()
- CvDiplomacyAI::GetGreetHumanMessage(LeaderheadAnimationTypes &)
- CvDiplomacyAI::GetInsultHumanMessage()
- CvGrandStrategyAI::GetGuessOtherPlayerConquestPriority(PlayerTypes, int)