CvDiplomacyAI::SetMilitaryThreat(PlayerTypes, ThreatTypes)
- Defined in
- CvDiplomacyAI.cpp, line 6964
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_SetMilitaryThreat
Hooks
static bool BeforeCvDiplomacyAI_SetMilitaryThreat(CvDiplomacyAI* self, PlayerTypes ePlayer, ThreatTypes eMilitaryThreat);static void AfterCvDiplomacyAI_SetMilitaryThreat(CvDiplomacyAI* self, PlayerTypes ePlayer, ThreatTypes eMilitaryThreat);static void ReplaceCvDiplomacyAI_SetMilitaryThreat(void (*original)(CvDiplomacyAI*, PlayerTypes, ThreatTypes), CvDiplomacyAI* self, PlayerTypes ePlayer, ThreatTypes eMilitaryThreat);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetMilitaryThreat>(host, &BeforeCvDiplomacyAI_SetMilitaryThreat);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetMilitaryThreat>(host, &AfterCvDiplomacyAI_SetMilitaryThreat);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetMilitaryThreat>(host, &ReplaceCvDiplomacyAI_SetMilitaryThreat);
Code
6963/// Set how threatening this player is militarily6964void CvDiplomacyAI::SetMilitaryThreat(PlayerTypes ePlayer, ThreatTypes eMilitaryThreat)6965{6966 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");6967 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.");6968 CvAssertMsg(eMilitaryThreat >= 0, "DIPLOMACY_AI: Invalid ThreatType. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");6969 CvAssertMsg(eMilitaryThreat < NUM_THREAT_VALUES, "DIPLOMACY_AI: Invalid v. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");6970 m_paeMilitaryThreat[ePlayer] = eMilitaryThreat;6971}