Bazaar developer reference

CvDiplomacyAI::GetOtherPlayerNumProtectedMinorsAttacked(PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 9962
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetOtherPlayerNumProtectedMinorsAttacked

Hooks

static bool BeforeCvDiplomacyAI_GetOtherPlayerNumProtectedMinorsAttacked(const CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetOtherPlayerNumProtectedMinorsAttacked(const CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetOtherPlayerNumProtectedMinorsAttacked(int (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetOtherPlayerNumProtectedMinorsAttacked>(host, &BeforeCvDiplomacyAI_GetOtherPlayerNumProtectedMinorsAttacked);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetOtherPlayerNumProtectedMinorsAttacked>(host, &AfterCvDiplomacyAI_GetOtherPlayerNumProtectedMinorsAttacked);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetOtherPlayerNumProtectedMinorsAttacked>(host, &ReplaceCvDiplomacyAI_GetOtherPlayerNumProtectedMinorsAttacked);

Code

9961/// How many ProtectedMinors have we seen this Player attack9962int CvDiplomacyAI::GetOtherPlayerNumProtectedMinorsAttacked(PlayerTypes ePlayer) const9963{9964	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");9965	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.");9966	return m_paiOtherPlayerNumProtectedMinorsAttacked[ePlayer];9967}

Called by