Bazaar developer reference

CvDiplomacyAI::GetDOFWithAnyFriendScore(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 23880
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetDOFWithAnyFriendScore

Hooks

static bool BeforeCvDiplomacyAI_GetDOFWithAnyFriendScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetDOFWithAnyFriendScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetDOFWithAnyFriendScore(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetDOFWithAnyFriendScore>(host, &BeforeCvDiplomacyAI_GetDOFWithAnyFriendScore);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetDOFWithAnyFriendScore>(host, &AfterCvDiplomacyAI_GetDOFWithAnyFriendScore);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetDOFWithAnyFriendScore>(host, &ReplaceCvDiplomacyAI_GetDOFWithAnyFriendScore);

Code

23880int CvDiplomacyAI::GetDOFWithAnyFriendScore(PlayerTypes ePlayer)23881{23882	int iOpinionWeight = 0;23883	// They have a DoF with at least one other player we have a DoF with23884	if(IsPlayerDoFwithAnyFriend(ePlayer))23885		iOpinionWeight += /*-15*/ GC.getOPINION_WEIGHT_DOF_WITH_FRIEND();23886	return iOpinionWeight;23887}

Calls

Called by