Bazaar developer reference

CvDiplomacyAI::GetReligiousConversionPointsScore(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 23457
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetReligiousConversionPointsScore

Hooks

static bool BeforeCvDiplomacyAI_GetReligiousConversionPointsScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetReligiousConversionPointsScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetReligiousConversionPointsScore(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetReligiousConversionPointsScore>(host, &BeforeCvDiplomacyAI_GetReligiousConversionPointsScore);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetReligiousConversionPointsScore>(host, &AfterCvDiplomacyAI_GetReligiousConversionPointsScore);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetReligiousConversionPointsScore>(host, &ReplaceCvDiplomacyAI_GetReligiousConversionPointsScore);

Code

23457int CvDiplomacyAI::GetReligiousConversionPointsScore(PlayerTypes ePlayer)23458{23459	int iOpinionWeight = 0;23460	if(GetNegativeReligiousConversionPoints(ePlayer) > 0)23461	{23462		iOpinionWeight += (GetNegativeReligiousConversionPoints(ePlayer) * GC.getEraInfo(GC.getGame().getCurrentEra())->getDiploEmphasisReligion() * /*2*/ GC.getOPINION_WEIGHT_PER_NEGATIVE_CONVERSION());23463	}23464	return iOpinionWeight;23465}

Calls

Called by