Bazaar developer reference

CvDiplomacyAI::GetTimesIntrigueSharedScore(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 23530
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetTimesIntrigueSharedScore

Hooks

static bool BeforeCvDiplomacyAI_GetTimesIntrigueSharedScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetTimesIntrigueSharedScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetTimesIntrigueSharedScore(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetTimesIntrigueSharedScore>(host, &BeforeCvDiplomacyAI_GetTimesIntrigueSharedScore);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetTimesIntrigueSharedScore>(host, &AfterCvDiplomacyAI_GetTimesIntrigueSharedScore);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetTimesIntrigueSharedScore>(host, &ReplaceCvDiplomacyAI_GetTimesIntrigueSharedScore);

Code

23530int CvDiplomacyAI::GetTimesIntrigueSharedScore(PlayerTypes ePlayer)23531{23532	int iOpinionWeight = 0;23533	if(GetNumTimesIntrigueSharedBy(ePlayer) > 0)23534		iOpinionWeight += (GetNumTimesIntrigueSharedBy(ePlayer) * /*-20*/ GC.getOPINION_WEIGHT_INTRIGUE_SHARED_BY());23535	return iOpinionWeight;23536}

Calls

Called by