Bazaar developer reference

CvMinorCivAI::IsPlayerHasOpenBordersAutomatically(PlayerTypes)

Defined in
CvMinorCivAI.cpp, line 7290
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_IsPlayerHasOpenBordersAutomatically

Hooks

static bool BeforeCvMinorCivAI_IsPlayerHasOpenBordersAutomatically(CvMinorCivAI* self, PlayerTypes ePlayer, bool& result);static void AfterCvMinorCivAI_IsPlayerHasOpenBordersAutomatically(CvMinorCivAI* self, PlayerTypes ePlayer, bool& result);static bool ReplaceCvMinorCivAI_IsPlayerHasOpenBordersAutomatically(bool (*original)(CvMinorCivAI*, PlayerTypes), CvMinorCivAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvMinorCivAI_IsPlayerHasOpenBordersAutomatically>(host, &BeforeCvMinorCivAI_IsPlayerHasOpenBordersAutomatically);CivRegisterAfter<CivHooks::CvMinorCivAI_IsPlayerHasOpenBordersAutomatically>(host, &AfterCvMinorCivAI_IsPlayerHasOpenBordersAutomatically);CivRegisterReplace<CivHooks::CvMinorCivAI_IsPlayerHasOpenBordersAutomatically>(host, &ReplaceCvMinorCivAI_IsPlayerHasOpenBordersAutomatically);

Code

7289/// Is a player allowed to be inside someone else's borders automatically?7290bool CvMinorCivAI::IsPlayerHasOpenBordersAutomatically(PlayerTypes ePlayer)7291{7292	// Special trait?7293	if(GET_PLAYER(ePlayer).GetPlayerTraits()->GetCityStateFriendshipModifier() > 0)7294		return true;72957296	return false;7297}

Calls

Called by