Bazaar developer reference

CvDiplomacyAI::GetOtherPlayerProtectedMinorAttacked(PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 9944
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetOtherPlayerProtectedMinorAttacked

Hooks

static bool BeforeCvDiplomacyAI_GetOtherPlayerProtectedMinorAttacked(const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes& result);static void AfterCvDiplomacyAI_GetOtherPlayerProtectedMinorAttacked(const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes& result);static PlayerTypes ReplaceCvDiplomacyAI_GetOtherPlayerProtectedMinorAttacked(PlayerTypes (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetOtherPlayerProtectedMinorAttacked>(host, &BeforeCvDiplomacyAI_GetOtherPlayerProtectedMinorAttacked);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetOtherPlayerProtectedMinorAttacked>(host, &AfterCvDiplomacyAI_GetOtherPlayerProtectedMinorAttacked);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetOtherPlayerProtectedMinorAttacked>(host, &ReplaceCvDiplomacyAI_GetOtherPlayerProtectedMinorAttacked);

Code

9943/// Who was the last Minor ePlayer attacked that we were protecting?9944PlayerTypes CvDiplomacyAI::GetOtherPlayerProtectedMinorAttacked(PlayerTypes ePlayer) const9945{9946	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");9947	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.");9948	return (PlayerTypes) m_paiOtherPlayerProtectedMinorAttacked[ePlayer];9949}

Called by