Bazaar developer reference

CvDiplomacyAI::ChangeNegativeReligiousConversionPoints(PlayerTypes, int)

Defined in
CvDiplomacyAI.cpp, line 23196
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_ChangeNegativeReligiousConversionPoints

Hooks

static bool BeforeCvDiplomacyAI_ChangeNegativeReligiousConversionPoints(CvDiplomacyAI* self, PlayerTypes ePlayer, int iChange);static void AfterCvDiplomacyAI_ChangeNegativeReligiousConversionPoints(CvDiplomacyAI* self, PlayerTypes ePlayer, int iChange);static void ReplaceCvDiplomacyAI_ChangeNegativeReligiousConversionPoints(void (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iChange);CivRegisterBefore<CivHooks::CvDiplomacyAI_ChangeNegativeReligiousConversionPoints>(host, &BeforeCvDiplomacyAI_ChangeNegativeReligiousConversionPoints);CivRegisterAfter<CivHooks::CvDiplomacyAI_ChangeNegativeReligiousConversionPoints>(host, &AfterCvDiplomacyAI_ChangeNegativeReligiousConversionPoints);CivRegisterReplace<CivHooks::CvDiplomacyAI_ChangeNegativeReligiousConversionPoints>(host, &ReplaceCvDiplomacyAI_ChangeNegativeReligiousConversionPoints);

Code

23195/// Converted religion of my cities?23196void CvDiplomacyAI::ChangeNegativeReligiousConversionPoints(PlayerTypes ePlayer, int iChange)23197{23198	if(iChange != 0)23199	{23200		CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");23201		CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");2320223203		m_paiNegativeReligiousConversionPoints[ePlayer] += iChange;23204		CvAssertMsg(m_paiNegativeReligiousConversionPoints[ePlayer] >= 0, "DIPLOMACY_AI: Invalid # of Religious Conversions returned. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");23205	}23206}

Called by