Bazaar developer reference

CvDiplomacyAI::GetOtherPlayerNumMajorsAttacked(PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 10214
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetOtherPlayerNumMajorsAttacked

Hooks

static bool BeforeCvDiplomacyAI_GetOtherPlayerNumMajorsAttacked(const CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetOtherPlayerNumMajorsAttacked(const CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetOtherPlayerNumMajorsAttacked(int (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetOtherPlayerNumMajorsAttacked>(host, &BeforeCvDiplomacyAI_GetOtherPlayerNumMajorsAttacked);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetOtherPlayerNumMajorsAttacked>(host, &AfterCvDiplomacyAI_GetOtherPlayerNumMajorsAttacked);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetOtherPlayerNumMajorsAttacked>(host, &ReplaceCvDiplomacyAI_GetOtherPlayerNumMajorsAttacked);

Code

10213/// How many Majors have we seen this Player attack10214int CvDiplomacyAI::GetOtherPlayerNumMajorsAttacked(PlayerTypes ePlayer) const10215{10216	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");10217	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.");10218	return m_paiOtherPlayerNumMajorsAttacked[ePlayer];10219}

Called by