Bazaar developer reference

CvDiplomacyAI::IsPlayerMadeAttackCityStatePromise(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 22634
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_IsPlayerMadeAttackCityStatePromise

Hooks

static bool BeforeCvDiplomacyAI_IsPlayerMadeAttackCityStatePromise(CvDiplomacyAI* self, PlayerTypes ePlayer, bool& result);static void AfterCvDiplomacyAI_IsPlayerMadeAttackCityStatePromise(CvDiplomacyAI* self, PlayerTypes ePlayer, bool& result);static bool ReplaceCvDiplomacyAI_IsPlayerMadeAttackCityStatePromise(bool (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_IsPlayerMadeAttackCityStatePromise>(host, &BeforeCvDiplomacyAI_IsPlayerMadeAttackCityStatePromise);CivRegisterAfter<CivHooks::CvDiplomacyAI_IsPlayerMadeAttackCityStatePromise>(host, &AfterCvDiplomacyAI_IsPlayerMadeAttackCityStatePromise);CivRegisterReplace<CivHooks::CvDiplomacyAI_IsPlayerMadeAttackCityStatePromise>(host, &ReplaceCvDiplomacyAI_IsPlayerMadeAttackCityStatePromise);

Code

22634bool CvDiplomacyAI::IsPlayerMadeAttackCityStatePromise(PlayerTypes ePlayer)22635{22636	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");22637	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.");22638	return m_pabPlayerMadeAttackCityStatePromise[ePlayer];22639}

Called by