Bazaar developer reference

CvMinorCivAI::IsFriendshipAboveFriendsThreshold(int) const

Defined in
CvMinorCivAI.cpp, line 6897
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_IsFriendshipAboveFriendsThreshold

Hooks

static bool BeforeCvMinorCivAI_IsFriendshipAboveFriendsThreshold(const CvMinorCivAI* self, int iFriendship, bool& result);static void AfterCvMinorCivAI_IsFriendshipAboveFriendsThreshold(const CvMinorCivAI* self, int iFriendship, bool& result);static bool ReplaceCvMinorCivAI_IsFriendshipAboveFriendsThreshold(bool (*original)(const CvMinorCivAI*, int), const CvMinorCivAI* self, int iFriendship);CivRegisterBefore<CivHooks::CvMinorCivAI_IsFriendshipAboveFriendsThreshold>(host, &BeforeCvMinorCivAI_IsFriendshipAboveFriendsThreshold);CivRegisterAfter<CivHooks::CvMinorCivAI_IsFriendshipAboveFriendsThreshold>(host, &AfterCvMinorCivAI_IsFriendshipAboveFriendsThreshold);CivRegisterReplace<CivHooks::CvMinorCivAI_IsFriendshipAboveFriendsThreshold>(host, &ReplaceCvMinorCivAI_IsFriendshipAboveFriendsThreshold);

Code

6896/// Is the player above the "Friends" threshold?6897bool CvMinorCivAI::IsFriendshipAboveFriendsThreshold(int iFriendship) const6898{6899	int iFriendshipThresholdFriends = GetFriendsThreshold();69006901	if(iFriendship >= iFriendshipThresholdFriends)6902	{6903		return true;6904	}69056906	return false;6907}

Calls

Called by