Bazaar developer reference

CvDiplomacyAI::GetMilitaryThreat(PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 6956
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetMilitaryThreat

Hooks

static bool BeforeCvDiplomacyAI_GetMilitaryThreat(const CvDiplomacyAI* self, PlayerTypes ePlayer, ThreatTypes& result);static void AfterCvDiplomacyAI_GetMilitaryThreat(const CvDiplomacyAI* self, PlayerTypes ePlayer, ThreatTypes& result);static ThreatTypes ReplaceCvDiplomacyAI_GetMilitaryThreat(ThreatTypes (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetMilitaryThreat>(host, &BeforeCvDiplomacyAI_GetMilitaryThreat);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetMilitaryThreat>(host, &AfterCvDiplomacyAI_GetMilitaryThreat);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetMilitaryThreat>(host, &ReplaceCvDiplomacyAI_GetMilitaryThreat);

Code

6955/// How threatening is this player Militarily?6956ThreatTypes CvDiplomacyAI::GetMilitaryThreat(PlayerTypes ePlayer) const6957{6958	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");6959	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.");6960	return (ThreatTypes) m_paeMilitaryThreat[ePlayer];6961}

Called by