Bazaar developer reference

CvDiplomacyAI::ChangeNumTimesIntrigueSharedBy(PlayerTypes, int)

Defined in
CvDiplomacyAI.cpp, line 23262
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_ChangeNumTimesIntrigueSharedBy

Hooks

static bool BeforeCvDiplomacyAI_ChangeNumTimesIntrigueSharedBy(CvDiplomacyAI* self, PlayerTypes ePlayer, int iChange);static void AfterCvDiplomacyAI_ChangeNumTimesIntrigueSharedBy(CvDiplomacyAI* self, PlayerTypes ePlayer, int iChange);static void ReplaceCvDiplomacyAI_ChangeNumTimesIntrigueSharedBy(void (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iChange);CivRegisterBefore<CivHooks::CvDiplomacyAI_ChangeNumTimesIntrigueSharedBy>(host, &BeforeCvDiplomacyAI_ChangeNumTimesIntrigueSharedBy);CivRegisterAfter<CivHooks::CvDiplomacyAI_ChangeNumTimesIntrigueSharedBy>(host, &AfterCvDiplomacyAI_ChangeNumTimesIntrigueSharedBy);CivRegisterReplace<CivHooks::CvDiplomacyAI_ChangeNumTimesIntrigueSharedBy>(host, &ReplaceCvDiplomacyAI_ChangeNumTimesIntrigueSharedBy);

Code

23261/// Intrigue was shared by the player?23262void CvDiplomacyAI::ChangeNumTimesIntrigueSharedBy(PlayerTypes ePlayer, int iChange)23263{23264	if(iChange != 0)23265	{23266		CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send slewis this with your last 5 autosaves and what changelist # you're playing.");23267		CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index.  Please send slewis this with your last 5 autosaves and what changelist # you're playing.");2326823269		m_paiNumTimesIntrigueSharedBy[ePlayer] += iChange;23270		CvAssertMsg(m_paiNumTimesIntrigueSharedBy[ePlayer] >= 0, "DIPLOMACY_AI: Invalid # of Robbed By returned. Please send slewis this with your last 5 autosaves and what changelist # you're playing.");23271	}23272}

Called by