CvDiplomacyAI::GetIgnoredAttackCityStatePromiseScore(PlayerTypes)
- Defined in
- CvDiplomacyAI.cpp, line 23687
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_GetIgnoredAttackCityStatePromiseScore
Hooks
static bool BeforeCvDiplomacyAI_GetIgnoredAttackCityStatePromiseScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetIgnoredAttackCityStatePromiseScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetIgnoredAttackCityStatePromiseScore(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetIgnoredAttackCityStatePromiseScore>(host, &BeforeCvDiplomacyAI_GetIgnoredAttackCityStatePromiseScore);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetIgnoredAttackCityStatePromiseScore>(host, &AfterCvDiplomacyAI_GetIgnoredAttackCityStatePromiseScore);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetIgnoredAttackCityStatePromiseScore>(host, &ReplaceCvDiplomacyAI_GetIgnoredAttackCityStatePromiseScore);
Code
23687int CvDiplomacyAI::GetIgnoredAttackCityStatePromiseScore(PlayerTypes ePlayer)23688{23689 int iOpinionWeight = 0;23690 // Broken CityState attack promise with us?23691 if(IsPlayerBrokenAttackCityStatePromise(ePlayer))23692 {23693 // Broken CityState attack promise with someone?23694 }23695 else if(GET_TEAM(GET_PLAYER(ePlayer).getTeam()).IsBrokenCityStatePromise())23696 {23697 // Ignored our request for them to make a CityState attack promise?23698 }23699 else if(IsPlayerIgnoredAttackCityStatePromise(ePlayer))23700 {23701 iOpinionWeight += /*15*/ GC.getOPINION_WEIGHT_IGNORED_CITY_STATE_PROMISE(); //antonjs: todo: rename23702 }2370323704 return iOpinionWeight;23705}
Calls
- CvDiplomacyAI::IsPlayerBrokenAttackCityStatePromise(PlayerTypes)
- CvDiplomacyAI::IsPlayerIgnoredAttackCityStatePromise(PlayerTypes)
- CvGlobals::getOPINION_WEIGHT_IGNORED_CITY_STATE_PROMISE()
- CvPlayer::getTeam() const
- CvPlayerAI::getPlayer(PlayerTypes)
- CvTeam::getTeam(TeamTypes)
- CvTeam::IsBrokenCityStatePromise() const