CvMinorCivAI::GetEffectiveFriendshipWithMajor(PlayerTypes)
- Defined in
- CvMinorCivAI.cpp, line 6317
- Class
- CvMinorCivAI
- Hook name
CivHooks::CvMinorCivAI_GetEffectiveFriendshipWithMajor
Hooks
static bool BeforeCvMinorCivAI_GetEffectiveFriendshipWithMajor(CvMinorCivAI* self, PlayerTypes ePlayer, int& result);static void AfterCvMinorCivAI_GetEffectiveFriendshipWithMajor(CvMinorCivAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvMinorCivAI_GetEffectiveFriendshipWithMajor(int (*original)(CvMinorCivAI*, PlayerTypes), CvMinorCivAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvMinorCivAI_GetEffectiveFriendshipWithMajor>(host, &BeforeCvMinorCivAI_GetEffectiveFriendshipWithMajor);CivRegisterAfter<CivHooks::CvMinorCivAI_GetEffectiveFriendshipWithMajor>(host, &AfterCvMinorCivAI_GetEffectiveFriendshipWithMajor);CivRegisterReplace<CivHooks::CvMinorCivAI_GetEffectiveFriendshipWithMajor>(host, &ReplaceCvMinorCivAI_GetEffectiveFriendshipWithMajor);
Code
6314// What is the level of Friendship between this Minor and the requested Major Civ?6315// Takes war status into account6316// NOTE: Not const because of need to check war status6317int CvMinorCivAI::GetEffectiveFriendshipWithMajor(PlayerTypes ePlayer)6318{6319 return GetEffectiveFriendshipWithMajorTimes100(ePlayer) / 100;6320}
Calls
Called by
- CvDiplomacyAI::DoContactMinorCivs()
- CvDiplomacyAI::LogMinorCivGiftGold(PlayerTypes, int, int, bool, bool, PlayerTypes)
- CvEspionageAI::BuildMinorCityList(EspionageCityList &)
- CvPlayerEspionage::AttemptCoup(uint)
- CvMinorCivAI::CalculateBullyMetric(PlayerTypes, bool, CvString *)
- CvMinorCivAI::CanMajorProtect(PlayerTypes)
- CvMinorCivAI::DoChangeAliveStatus(bool)
- CvMinorCivAI::DoElection()
- CvMinorCivAI::DoFriendshipChangeEffects(PlayerTypes, int, int, bool, bool)
- CvMinorCivAI::GetMostFriendshipWithAnyMajor(PlayerTypes &)
- CvMinorCivAI::IsCloseToNotBeingAllies(PlayerTypes)
- CvMinorCivAI::IsCloseToNotBeingFriends(PlayerTypes)
- CvMinorCivAI::IsFriends(PlayerTypes)
- CvMinorCivAI::ResetFriendshipWithMajor(PlayerTypes)
- CvMinorCivQuest::DoFinishQuest()
- CvLuaPlayer::lGetMinorCivFriendshipWithMajor(lua_State *)