Bazaar developer reference

CvDiplomacyAI::GetBrokenNoConvertPromiseScore(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 23731
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetBrokenNoConvertPromiseScore

Hooks

static bool BeforeCvDiplomacyAI_GetBrokenNoConvertPromiseScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetBrokenNoConvertPromiseScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetBrokenNoConvertPromiseScore(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetBrokenNoConvertPromiseScore>(host, &BeforeCvDiplomacyAI_GetBrokenNoConvertPromiseScore);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetBrokenNoConvertPromiseScore>(host, &AfterCvDiplomacyAI_GetBrokenNoConvertPromiseScore);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetBrokenNoConvertPromiseScore>(host, &ReplaceCvDiplomacyAI_GetBrokenNoConvertPromiseScore);

Code

23731int CvDiplomacyAI::GetBrokenNoConvertPromiseScore(PlayerTypes ePlayer)23732{23733	int iOpinionWeight = 0;23734	// Broke a promise to not convert cities again?23735	if(IsPlayerBrokenNoConvertPromise(ePlayer))23736	{23737		iOpinionWeight += /*8*/ GC.getOPINION_WEIGHT_BROKEN_NO_CONVERT_PROMISE() * GC.getEraInfo(GC.getGame().getCurrentEra())->getDiploEmphasisReligion();23738	}23739	return iOpinionWeight;23740}

Calls

Called by