Bazaar developer reference

CvDiplomacyAI::GetIgnoredNoConvertPromiseScore(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 23742
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetIgnoredNoConvertPromiseScore

Hooks

static bool BeforeCvDiplomacyAI_GetIgnoredNoConvertPromiseScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetIgnoredNoConvertPromiseScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetIgnoredNoConvertPromiseScore(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetIgnoredNoConvertPromiseScore>(host, &BeforeCvDiplomacyAI_GetIgnoredNoConvertPromiseScore);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetIgnoredNoConvertPromiseScore>(host, &AfterCvDiplomacyAI_GetIgnoredNoConvertPromiseScore);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetIgnoredNoConvertPromiseScore>(host, &ReplaceCvDiplomacyAI_GetIgnoredNoConvertPromiseScore);

Code

23742int CvDiplomacyAI::GetIgnoredNoConvertPromiseScore(PlayerTypes ePlayer)23743{23744	int iOpinionWeight = 0;23745	// Broke a promise to not convert cities again?23746	if(IsPlayerBrokenNoConvertPromise(ePlayer))23747	{23748	}23749	else if(IsPlayerIgnoredNoConvertPromise(ePlayer))23750	{23751		iOpinionWeight += /*4*/ GC.getOPINION_WEIGHT_IGNORED_NO_CONVERT_PROMISE() * GC.getEraInfo(GC.getGame().getCurrentEra())->getDiploEmphasisReligion();23752	}23753	return iOpinionWeight;23754}

Calls

Called by