Bazaar developer reference

CvDiplomacyAI::SetOtherPlayerNumMinorsAttacked(PlayerTypes, int)

Defined in
CvDiplomacyAI.cpp, line 10166
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_SetOtherPlayerNumMinorsAttacked

Hooks

static bool BeforeCvDiplomacyAI_SetOtherPlayerNumMinorsAttacked(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void AfterCvDiplomacyAI_SetOtherPlayerNumMinorsAttacked(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void ReplaceCvDiplomacyAI_SetOtherPlayerNumMinorsAttacked(void (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetOtherPlayerNumMinorsAttacked>(host, &BeforeCvDiplomacyAI_SetOtherPlayerNumMinorsAttacked);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetOtherPlayerNumMinorsAttacked>(host, &AfterCvDiplomacyAI_SetOtherPlayerNumMinorsAttacked);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetOtherPlayerNumMinorsAttacked>(host, &ReplaceCvDiplomacyAI_SetOtherPlayerNumMinorsAttacked);

Code

10165/// Sets how many Minors have we seen this Player attack10166void CvDiplomacyAI::SetOtherPlayerNumMinorsAttacked(PlayerTypes ePlayer, int iValue)10167{10168	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");10169	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.");10170	CvAssertMsg(iValue >= 0, "DIPLOMACY_AI: Setting number of minors attacked to a negative value.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");10171	m_paiOtherPlayerNumMinorsAttacked[ePlayer] = iValue;10172}

Called by