Bazaar developer reference

CvDiplomacyAI::SetOtherPlayerNumProtectedMinorsKilled(PlayerTypes, int)

Defined in
CvDiplomacyAI.cpp, line 10038
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_SetOtherPlayerNumProtectedMinorsKilled

Hooks

static bool BeforeCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsKilled(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void AfterCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsKilled(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void ReplaceCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsKilled(void (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetOtherPlayerNumProtectedMinorsKilled>(host, &BeforeCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsKilled);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetOtherPlayerNumProtectedMinorsKilled>(host, &AfterCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsKilled);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetOtherPlayerNumProtectedMinorsKilled>(host, &ReplaceCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsKilled);

Code

10037/// Sets how many ProtectedMinors have we seen this Player attack10038void CvDiplomacyAI::SetOtherPlayerNumProtectedMinorsKilled(PlayerTypes ePlayer, int iValue)10039{10040	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");10041	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.");10042	m_paiOtherPlayerNumProtectedMinorsKilled[ePlayer] = iValue;10043}

Called by