Bazaar developer reference

CvDiplomacyAI::GetEstimateOtherPlayerMilitaryThreat(PlayerTypes, PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 7108
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetEstimateOtherPlayerMilitaryThreat

Hooks

static bool BeforeCvDiplomacyAI_GetEstimateOtherPlayerMilitaryThreat(const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eWithPlayer, ThreatTypes& result);static void AfterCvDiplomacyAI_GetEstimateOtherPlayerMilitaryThreat(const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eWithPlayer, ThreatTypes& result);static ThreatTypes ReplaceCvDiplomacyAI_GetEstimateOtherPlayerMilitaryThreat(ThreatTypes (*original)(const CvDiplomacyAI*, PlayerTypes, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eWithPlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetEstimateOtherPlayerMilitaryThreat>(host, &BeforeCvDiplomacyAI_GetEstimateOtherPlayerMilitaryThreat);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetEstimateOtherPlayerMilitaryThreat>(host, &AfterCvDiplomacyAI_GetEstimateOtherPlayerMilitaryThreat);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetEstimateOtherPlayerMilitaryThreat>(host, &ReplaceCvDiplomacyAI_GetEstimateOtherPlayerMilitaryThreat);

Code

7107/// What is our guess as to the level of Military Threat one player feels from another?7108ThreatTypes CvDiplomacyAI::GetEstimateOtherPlayerMilitaryThreat(PlayerTypes ePlayer, PlayerTypes eWithPlayer) const7109{7110	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");7111	CvAssertMsg(ePlayer < MAX_CIV_PLAYERS, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");7112	CvAssertMsg(eWithPlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");7113	CvAssertMsg(eWithPlayer < MAX_CIV_PLAYERS, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");7114	return (ThreatTypes) m_ppaaeOtherPlayerMilitaryThreat[ePlayer][eWithPlayer];7115}

Called by