Bazaar developer reference

CvDiplomacyAI::GetDOFWithAnyEnemyScore(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 23889
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetDOFWithAnyEnemyScore

Hooks

static bool BeforeCvDiplomacyAI_GetDOFWithAnyEnemyScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetDOFWithAnyEnemyScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetDOFWithAnyEnemyScore(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetDOFWithAnyEnemyScore>(host, &BeforeCvDiplomacyAI_GetDOFWithAnyEnemyScore);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetDOFWithAnyEnemyScore>(host, &AfterCvDiplomacyAI_GetDOFWithAnyEnemyScore);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetDOFWithAnyEnemyScore>(host, &ReplaceCvDiplomacyAI_GetDOFWithAnyEnemyScore);

Code

23889int CvDiplomacyAI::GetDOFWithAnyEnemyScore(PlayerTypes ePlayer)23890{23891	int iOpinionWeight = 0;23892	// They have a DoF with at least one other player we have DENOUNCED23893	if(IsPlayerDoFwithAnyEnemy(ePlayer))23894		iOpinionWeight += /*15*/ GC.getOPINION_WEIGHT_DOF_WITH_ENEMY();23895	return iOpinionWeight;23896}

Calls

Called by