CvDiplomacyAI::IsGoingForDiploVictory()
- Defined in
- CvDiplomacyAI.cpp, line 24377
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_IsGoingForDiploVictory
Hooks
static bool BeforeCvDiplomacyAI_IsGoingForDiploVictory(CvDiplomacyAI* self, bool& result);static void AfterCvDiplomacyAI_IsGoingForDiploVictory(CvDiplomacyAI* self, bool& result);static bool ReplaceCvDiplomacyAI_IsGoingForDiploVictory(bool (*original)(CvDiplomacyAI*), CvDiplomacyAI* self);CivRegisterBefore<CivHooks::CvDiplomacyAI_IsGoingForDiploVictory>(host, &BeforeCvDiplomacyAI_IsGoingForDiploVictory);CivRegisterAfter<CivHooks::CvDiplomacyAI_IsGoingForDiploVictory>(host, &AfterCvDiplomacyAI_IsGoingForDiploVictory);CivRegisterReplace<CivHooks::CvDiplomacyAI_IsGoingForDiploVictory>(host, &ReplaceCvDiplomacyAI_IsGoingForDiploVictory);
Code
24376/// Does this player want to win by diplo?24377bool CvDiplomacyAI::IsGoingForDiploVictory()24378{24379 AIGrandStrategyTypes eGrandStrategy = (AIGrandStrategyTypes) GC.getInfoTypeForString("AIGRANDSTRATEGY_UNITED_NATIONS");2438024381 if(eGrandStrategy != NO_AIGRANDSTRATEGY)24382 {24383 if(GetPlayer()->GetGrandStrategyAI()->GetActiveGrandStrategy() == eGrandStrategy)24384 {24385 return true;24386 }24387 }2438824389 return false;24390}
Calls
Called by
- CvCityStrategyAI::ChooseProduction(bool, BuildingTypes, UnitTypes)
- CvDiplomacyAI::DoContactMinorCivs()
- CvDiplomacyAI::DoPossibleMinorLiberation(PlayerTypes, int)
- CvDiplomacyAI::GetBestApproachTowardsMinorCiv(PlayerTypes, int &, bool, bool)
- CvDiplomacyAI::GetCoopWarScore(PlayerTypes, PlayerTypes, bool)
- CvEspionageAI::BuildMinorCityList(EspionageCityList &)
- CvEspionageAI::FindTargetSpyNumbers(int *, int *, int *, int *)
- CvPlayerAI::AI_conquerCity(CvCity *, PlayerTypes)
- CvPlayerAI::GetDirectiveMerchant(CvUnit *)
- CvWonderProductionAI::ChooseWonder(bool, bool, int &)
- CvWonderProductionAI::ChooseWonderForGreatEngineer(bool, int &, CvCity *&)