Bazaar developer reference

CvMinorCivAI::IsEverFriends(PlayerTypes)

Defined in
CvMinorCivAI.cpp, line 6667
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_IsEverFriends

Hooks

static bool BeforeCvMinorCivAI_IsEverFriends(CvMinorCivAI* self, PlayerTypes ePlayer, bool& result);static void AfterCvMinorCivAI_IsEverFriends(CvMinorCivAI* self, PlayerTypes ePlayer, bool& result);static bool ReplaceCvMinorCivAI_IsEverFriends(bool (*original)(CvMinorCivAI*, PlayerTypes), CvMinorCivAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvMinorCivAI_IsEverFriends>(host, &BeforeCvMinorCivAI_IsEverFriends);CivRegisterAfter<CivHooks::CvMinorCivAI_IsEverFriends>(host, &AfterCvMinorCivAI_IsEverFriends);CivRegisterReplace<CivHooks::CvMinorCivAI_IsEverFriends>(host, &ReplaceCvMinorCivAI_IsEverFriends);

Code

6666/// Has ePlayer ever been Friends with this minor?6667bool CvMinorCivAI::IsEverFriends(PlayerTypes ePlayer)6668{6669	CvAssertMsg(ePlayer >= 0, "ePlayer is expected to be non-negative (invalid Index)");6670	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "ePlayer is expected to be within maximum bounds (invalid Index)");6671	if(ePlayer < 0 || ePlayer >= MAX_MAJOR_CIVS) return false;66726673	return m_abEverFriends[ePlayer];6674}

Called by