CvDiplomacyAI::GetWarGoal(PlayerTypes) const
- Defined in
- CvDiplomacyAI.cpp, line 6347
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_GetWarGoal
Hooks
static bool BeforeCvDiplomacyAI_GetWarGoal(const CvDiplomacyAI* self, PlayerTypes ePlayer, WarGoalTypes& result);static void AfterCvDiplomacyAI_GetWarGoal(const CvDiplomacyAI* self, PlayerTypes ePlayer, WarGoalTypes& result);static WarGoalTypes ReplaceCvDiplomacyAI_GetWarGoal(WarGoalTypes (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetWarGoal>(host, &BeforeCvDiplomacyAI_GetWarGoal);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetWarGoal>(host, &AfterCvDiplomacyAI_GetWarGoal);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetWarGoal>(host, &ReplaceCvDiplomacyAI_GetWarGoal);
Code
6346/// What is the Goal of war with this Player6347WarGoalTypes CvDiplomacyAI::GetWarGoal(PlayerTypes ePlayer) const6348{6349 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");6350 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.");6351 return (WarGoalTypes) m_paeWarGoal[ePlayer];6352}
Called by
- CvDeal::IsPossibleToTradeItem(PlayerTypes, PlayerTypes, TradeableItems, int, int, int, bool, bool, bool)
- CvDiplomacyAI::DoCancelHaltDemandProcess()
- CvDiplomacyAI::DoMakeWarOnPlayer(PlayerTypes)
- CvDiplomacyAI::DoTestDemandReady()
- CvDiplomacyAI::DoUpdatePeaceTreatyWillingness()
- CvDiplomacyAI::DoUpdateWarGoals()
- CvDiplomacyAI::GetBestApproachTowardsMajorCiv(PlayerTypes, int &, bool, bool, WarFaceTypes &)
- CvDiplomacyAI::GetBestApproachTowardsMinorCiv(PlayerTypes, int &, bool, bool)
- CvDiplomacyAI::IsPlayerDemandAttractive(PlayerTypes)
- CvDiplomacyAI::LogWarGoal(CvString &, PlayerTypes)
- CvDiplomacyAI::LogWarState(CvString &, PlayerTypes)
- CvDiplomacyAI::LogWarStatus()
- CvEspionageAI::BuildOffenseCityList(EspionageCityList &)
- MilitaryAIHelpers::IsTestStrategy_EradicateBarbarians(MilitaryAIStrategyTypes, CvPlayer *, int, int)
- MilitaryAIHelpers::IsTestStrategy_WarMobilization(MilitaryAIStrategyTypes, CvPlayer *)
- CvPlayerAI::FindBestMerchantTargetPlot(CvUnit *, bool)