Hooks
static bool BeforeCvDiplomacyAI_SetEstimateOtherPlayerMilitaryThreat(CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eWithPlayer, ThreatTypes eThreatType);static void AfterCvDiplomacyAI_SetEstimateOtherPlayerMilitaryThreat(CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eWithPlayer, ThreatTypes eThreatType);static void ReplaceCvDiplomacyAI_SetEstimateOtherPlayerMilitaryThreat(void (*original)(CvDiplomacyAI*, PlayerTypes, PlayerTypes, ThreatTypes), CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eWithPlayer, ThreatTypes eThreatType);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetEstimateOtherPlayerMilitaryThreat>(host, &BeforeCvDiplomacyAI_SetEstimateOtherPlayerMilitaryThreat);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetEstimateOtherPlayerMilitaryThreat>(host, &AfterCvDiplomacyAI_SetEstimateOtherPlayerMilitaryThreat);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetEstimateOtherPlayerMilitaryThreat>(host, &ReplaceCvDiplomacyAI_SetEstimateOtherPlayerMilitaryThreat);
Code
7117void CvDiplomacyAI::SetEstimateOtherPlayerMilitaryThreat(PlayerTypes ePlayer, PlayerTypes eWithPlayer, ThreatTypes eThreatType)7118{7119 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");7120 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.");7121 CvAssertMsg(eWithPlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");7122 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.");7123 CvAssertMsg(eThreatType >= 0, "DIPLOMACY_AI: Invalid ThreatType. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");7124 CvAssertMsg(eThreatType < NUM_THREAT_VALUES, "DIPLOMACY_AI: Invalid ThreatType. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");7125 m_ppaaeOtherPlayerMilitaryThreat[ePlayer][eWithPlayer] = eThreatType;7126}