Bazaar developer reference

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