CvDiplomacyAI::IsPlayerBrokenMilitaryPromise(PlayerTypes)
- Defined in
- CvDiplomacyAI.cpp, line 22366
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_IsPlayerBrokenMilitaryPromise
Hooks
static bool BeforeCvDiplomacyAI_IsPlayerBrokenMilitaryPromise(CvDiplomacyAI* self, PlayerTypes ePlayer, bool& result);static void AfterCvDiplomacyAI_IsPlayerBrokenMilitaryPromise(CvDiplomacyAI* self, PlayerTypes ePlayer, bool& result);static bool ReplaceCvDiplomacyAI_IsPlayerBrokenMilitaryPromise(bool (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_IsPlayerBrokenMilitaryPromise>(host, &BeforeCvDiplomacyAI_IsPlayerBrokenMilitaryPromise);CivRegisterAfter<CivHooks::CvDiplomacyAI_IsPlayerBrokenMilitaryPromise>(host, &AfterCvDiplomacyAI_IsPlayerBrokenMilitaryPromise);CivRegisterReplace<CivHooks::CvDiplomacyAI_IsPlayerBrokenMilitaryPromise>(host, &ReplaceCvDiplomacyAI_IsPlayerBrokenMilitaryPromise);
Code
22366bool CvDiplomacyAI::IsPlayerBrokenMilitaryPromise(PlayerTypes ePlayer)22367{22368 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");22369 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.");22370 return m_pabPlayerBrokenMilitaryPromise[ePlayer];22371}
Called by
- CvDiplomacyAI::GetAttackedByHumanMessage()
- CvDiplomacyAI::GetBestApproachTowardsMajorCiv(PlayerTypes, int &, bool, bool, WarFaceTypes &)
- CvDiplomacyAI::GetBrokenMilitaryPromiseScore(PlayerTypes)
- CvDiplomacyAI::GetBrokenMilitaryPromiseWithAnybodyScore(PlayerTypes)
- CvDiplomacyAI::GetIgnoredMilitaryPromiseScore(PlayerTypes)
- CvLuaPlayer::lIsPlayerBrokenMilitaryPromise(lua_State *)