Bazaar developer reference

CvMinorCivAI::IsFriendshipAboveAlliesThreshold(int) const

Defined in
CvMinorCivAI.cpp, line 6917
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_IsFriendshipAboveAlliesThreshold

Hooks

static bool BeforeCvMinorCivAI_IsFriendshipAboveAlliesThreshold(const CvMinorCivAI* self, int iFriendship, bool& result);static void AfterCvMinorCivAI_IsFriendshipAboveAlliesThreshold(const CvMinorCivAI* self, int iFriendship, bool& result);static bool ReplaceCvMinorCivAI_IsFriendshipAboveAlliesThreshold(bool (*original)(const CvMinorCivAI*, int), const CvMinorCivAI* self, int iFriendship);CivRegisterBefore<CivHooks::CvMinorCivAI_IsFriendshipAboveAlliesThreshold>(host, &BeforeCvMinorCivAI_IsFriendshipAboveAlliesThreshold);CivRegisterAfter<CivHooks::CvMinorCivAI_IsFriendshipAboveAlliesThreshold>(host, &AfterCvMinorCivAI_IsFriendshipAboveAlliesThreshold);CivRegisterReplace<CivHooks::CvMinorCivAI_IsFriendshipAboveAlliesThreshold>(host, &ReplaceCvMinorCivAI_IsFriendshipAboveAlliesThreshold);

Code

6916/// Is the player above the treshold to get the Allies bonus?6917bool CvMinorCivAI::IsFriendshipAboveAlliesThreshold(int iFriendship) const6918{6919	int iFriendshipThresholdAllies = GetAlliesThreshold();69206921	if(iFriendship >= iFriendshipThresholdAllies)6922	{6923		return true;6924	}69256926	return false;6927}

Calls

Called by