Bazaar developer reference

CvDiplomacyAI::GetWarmongerThreat(PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 7278
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetWarmongerThreat

Hooks

static bool BeforeCvDiplomacyAI_GetWarmongerThreat(const CvDiplomacyAI* self, PlayerTypes ePlayer, ThreatTypes& result);static void AfterCvDiplomacyAI_GetWarmongerThreat(const CvDiplomacyAI* self, PlayerTypes ePlayer, ThreatTypes& result);static ThreatTypes ReplaceCvDiplomacyAI_GetWarmongerThreat(ThreatTypes (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetWarmongerThreat>(host, &BeforeCvDiplomacyAI_GetWarmongerThreat);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetWarmongerThreat>(host, &AfterCvDiplomacyAI_GetWarmongerThreat);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetWarmongerThreat>(host, &ReplaceCvDiplomacyAI_GetWarmongerThreat);

Code

7277/// How much of a threat are these guys to run amok and break everything7278ThreatTypes CvDiplomacyAI::GetWarmongerThreat(PlayerTypes ePlayer) const7279{7280	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");7281	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.");7282	return (ThreatTypes) m_paeWarmongerThreat[ePlayer];7283}

Called by