Bazaar developer reference

CvDiplomacyAI::IsPlayerMadeMilitaryPromise(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 22352
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_IsPlayerMadeMilitaryPromise

Hooks

static bool BeforeCvDiplomacyAI_IsPlayerMadeMilitaryPromise(CvDiplomacyAI* self, PlayerTypes ePlayer, bool& result);static void AfterCvDiplomacyAI_IsPlayerMadeMilitaryPromise(CvDiplomacyAI* self, PlayerTypes ePlayer, bool& result);static bool ReplaceCvDiplomacyAI_IsPlayerMadeMilitaryPromise(bool (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_IsPlayerMadeMilitaryPromise>(host, &BeforeCvDiplomacyAI_IsPlayerMadeMilitaryPromise);CivRegisterAfter<CivHooks::CvDiplomacyAI_IsPlayerMadeMilitaryPromise>(host, &AfterCvDiplomacyAI_IsPlayerMadeMilitaryPromise);CivRegisterReplace<CivHooks::CvDiplomacyAI_IsPlayerMadeMilitaryPromise>(host, &ReplaceCvDiplomacyAI_IsPlayerMadeMilitaryPromise);

Code

22352bool CvDiplomacyAI::IsPlayerMadeMilitaryPromise(PlayerTypes ePlayer)22353{22354	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");22355	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.");22356	return m_pabPlayerMadeMilitaryPromise[ePlayer];22357}

Called by