Bazaar developer reference

CvMinorCivAI::SetEverFriends(PlayerTypes, bool)

Defined in
CvMinorCivAI.cpp, line 6677
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_SetEverFriends

Hooks

static bool BeforeCvMinorCivAI_SetEverFriends(CvMinorCivAI* self, PlayerTypes ePlayer, bool bValue);static void AfterCvMinorCivAI_SetEverFriends(CvMinorCivAI* self, PlayerTypes ePlayer, bool bValue);static void ReplaceCvMinorCivAI_SetEverFriends(void (*original)(CvMinorCivAI*, PlayerTypes, bool), CvMinorCivAI* self, PlayerTypes ePlayer, bool bValue);CivRegisterBefore<CivHooks::CvMinorCivAI_SetEverFriends>(host, &BeforeCvMinorCivAI_SetEverFriends);CivRegisterAfter<CivHooks::CvMinorCivAI_SetEverFriends>(host, &AfterCvMinorCivAI_SetEverFriends);CivRegisterReplace<CivHooks::CvMinorCivAI_SetEverFriends>(host, &ReplaceCvMinorCivAI_SetEverFriends);

Code

6676/// Has ePlayer ever been Friends with this minor?6677void CvMinorCivAI::SetEverFriends(PlayerTypes ePlayer, bool bValue)6678{6679	CvAssertMsg(ePlayer >= 0, "ePlayer is expected to be non-negative (invalid Index)");6680	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "ePlayer is expected to be within maximum bounds (invalid Index)");6681	if(ePlayer < 0 || ePlayer >= MAX_MAJOR_CIVS) return;66826683	m_abEverFriends[ePlayer] = bValue;6684}

Called by