Bazaar developer reference

CvDiplomacyAI::ChangeNumTimesCultureBombed(PlayerTypes, int)

Defined in
CvDiplomacyAI.cpp, line 23139
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_ChangeNumTimesCultureBombed

Hooks

static bool BeforeCvDiplomacyAI_ChangeNumTimesCultureBombed(CvDiplomacyAI* self, PlayerTypes ePlayer, int iChange);static void AfterCvDiplomacyAI_ChangeNumTimesCultureBombed(CvDiplomacyAI* self, PlayerTypes ePlayer, int iChange);static void ReplaceCvDiplomacyAI_ChangeNumTimesCultureBombed(void (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iChange);CivRegisterBefore<CivHooks::CvDiplomacyAI_ChangeNumTimesCultureBombed>(host, &BeforeCvDiplomacyAI_ChangeNumTimesCultureBombed);CivRegisterAfter<CivHooks::CvDiplomacyAI_ChangeNumTimesCultureBombed>(host, &AfterCvDiplomacyAI_ChangeNumTimesCultureBombed);CivRegisterReplace<CivHooks::CvDiplomacyAI_ChangeNumTimesCultureBombed>(host, &ReplaceCvDiplomacyAI_ChangeNumTimesCultureBombed);

Code

23138/// Culture Bombed?23139void CvDiplomacyAI::ChangeNumTimesCultureBombed(PlayerTypes ePlayer, int iChange)23140{23141	if(iChange != 0)23142	{23143		CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");23144		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.");2314523146		m_paiNumTimesCultureBombed[ePlayer] += iChange;23147		CvAssertMsg(m_paiNumTimesCultureBombed[ePlayer] >= 0, "DIPLOMACY_AI: Invalid # of Culture Bombs returned. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");23148	}23149}

Called by