Bazaar developer reference

CvDiplomacyAI::GetOtherPlayerProtectedMinorKilled(PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 10012
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetOtherPlayerProtectedMinorKilled

Hooks

static bool BeforeCvDiplomacyAI_GetOtherPlayerProtectedMinorKilled(const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes& result);static void AfterCvDiplomacyAI_GetOtherPlayerProtectedMinorKilled(const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes& result);static PlayerTypes ReplaceCvDiplomacyAI_GetOtherPlayerProtectedMinorKilled(PlayerTypes (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetOtherPlayerProtectedMinorKilled>(host, &BeforeCvDiplomacyAI_GetOtherPlayerProtectedMinorKilled);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetOtherPlayerProtectedMinorKilled>(host, &AfterCvDiplomacyAI_GetOtherPlayerProtectedMinorKilled);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetOtherPlayerProtectedMinorKilled>(host, &ReplaceCvDiplomacyAI_GetOtherPlayerProtectedMinorKilled);

Code

10011/// Who was the last Minor ePlayer Killed that we were protecting?10012PlayerTypes CvDiplomacyAI::GetOtherPlayerProtectedMinorKilled(PlayerTypes ePlayer) const10013{10014	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");10015	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.");10016	return (PlayerTypes) m_paiOtherPlayerProtectedMinorKilled[ePlayer];10017}

Called by