Bazaar developer reference

CvDiplomacyAI::SetOtherPlayerNumMajorsConquered(PlayerTypes, int)

Defined in
CvDiplomacyAI.cpp, line 10271
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_SetOtherPlayerNumMajorsConquered

Hooks

static bool BeforeCvDiplomacyAI_SetOtherPlayerNumMajorsConquered(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void AfterCvDiplomacyAI_SetOtherPlayerNumMajorsConquered(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void ReplaceCvDiplomacyAI_SetOtherPlayerNumMajorsConquered(void (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetOtherPlayerNumMajorsConquered>(host, &BeforeCvDiplomacyAI_SetOtherPlayerNumMajorsConquered);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetOtherPlayerNumMajorsConquered>(host, &AfterCvDiplomacyAI_SetOtherPlayerNumMajorsConquered);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetOtherPlayerNumMajorsConquered>(host, &ReplaceCvDiplomacyAI_SetOtherPlayerNumMajorsConquered);

Code

10270/// Sets how many Majors have we seen this Player conquer10271void CvDiplomacyAI::SetOtherPlayerNumMajorsConquered(PlayerTypes ePlayer, int iValue)10272{10273	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");10274	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.");10275	CvAssertMsg(iValue >= 0, "DIPLOMACY_AI: Setting number of Majors conquered to a negative value.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");10276	m_paiOtherPlayerNumMajorsConquered[ePlayer] = iValue;10277}

Called by