Bazaar developer reference

CvMinorCivAI::GetBaseFriendshipWithMajorTimes100(PlayerTypes) const

Defined in
CvMinorCivAI.cpp, line 6252
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_GetBaseFriendshipWithMajorTimes100

Hooks

static bool BeforeCvMinorCivAI_GetBaseFriendshipWithMajorTimes100(const CvMinorCivAI* self, PlayerTypes ePlayer, int& result);static void AfterCvMinorCivAI_GetBaseFriendshipWithMajorTimes100(const CvMinorCivAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvMinorCivAI_GetBaseFriendshipWithMajorTimes100(int (*original)(const CvMinorCivAI*, PlayerTypes), const CvMinorCivAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvMinorCivAI_GetBaseFriendshipWithMajorTimes100>(host, &BeforeCvMinorCivAI_GetBaseFriendshipWithMajorTimes100);CivRegisterAfter<CivHooks::CvMinorCivAI_GetBaseFriendshipWithMajorTimes100>(host, &AfterCvMinorCivAI_GetBaseFriendshipWithMajorTimes100);CivRegisterReplace<CivHooks::CvMinorCivAI_GetBaseFriendshipWithMajorTimes100>(host, &ReplaceCvMinorCivAI_GetBaseFriendshipWithMajorTimes100);

Code

6251// What is the raw, stored level of Friendship between this Minor and the requested Major Civ?6252int CvMinorCivAI::GetBaseFriendshipWithMajorTimes100(PlayerTypes ePlayer) const6253{6254	CvAssertMsg(ePlayer >= 0, "ePlayer is expected to be non-negative (invalid Index)");6255	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "ePlayer is expected to be within maximum bounds (invalid Index)");6256	if(ePlayer < 0 || ePlayer >= MAX_MAJOR_CIVS) return 0; // as defined during Reset()62576258	return m_aiFriendshipWithMajorTimes100[ePlayer];6259}

Called by