CvDiplomacyAI::GetWarState(PlayerTypes) const
- Defined in
- CvDiplomacyAI.cpp, line 5848
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_GetWarState
Hooks
static bool BeforeCvDiplomacyAI_GetWarState(const CvDiplomacyAI* self, PlayerTypes ePlayer, WarStateTypes& result);static void AfterCvDiplomacyAI_GetWarState(const CvDiplomacyAI* self, PlayerTypes ePlayer, WarStateTypes& result);static WarStateTypes ReplaceCvDiplomacyAI_GetWarState(WarStateTypes (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetWarState>(host, &BeforeCvDiplomacyAI_GetWarState);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetWarState>(host, &AfterCvDiplomacyAI_GetWarState);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetWarState>(host, &ReplaceCvDiplomacyAI_GetWarState);
Code
5847/// What is the state of war with this Player5848WarStateTypes CvDiplomacyAI::GetWarState(PlayerTypes ePlayer) const5849{5850 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");5851 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.");5852 return (WarStateTypes) m_paeWarState[ePlayer];5853}
Called by
- CvDiplomacyAI::DoUpdateMilitaryThreats()
- CvDiplomacyAI::DoUpdateWarGoals()
- CvDiplomacyAI::GetBestApproachTowardsMajorCiv(PlayerTypes, int &, bool, bool, WarFaceTypes &)
- CvDiplomacyAI::GetBestApproachTowardsMinorCiv(PlayerTypes, int &, bool, bool)
- CvDiplomacyAI::LogWarState(CvString &, PlayerTypes)
- CvDiplomacyAI::LogWarStatus()
- CvMilitaryAI::GetNumberCivsAtWarWith() const
- CvMilitaryAI::UpdateOperations()
- CvMilitaryAI::UpdateWars()