CvDiplomacyAI::SetOtherPlayerProtectedMinorKilled(PlayerTypes, PlayerTypes)
- Defined in
- CvDiplomacyAI.cpp, line 10020
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_SetOtherPlayerProtectedMinorKilled
Hooks
static bool BeforeCvDiplomacyAI_SetOtherPlayerProtectedMinorKilled(CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eKilledPlayer);static void AfterCvDiplomacyAI_SetOtherPlayerProtectedMinorKilled(CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eKilledPlayer);static void ReplaceCvDiplomacyAI_SetOtherPlayerProtectedMinorKilled(void (*original)(CvDiplomacyAI*, PlayerTypes, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eKilledPlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetOtherPlayerProtectedMinorKilled>(host, &BeforeCvDiplomacyAI_SetOtherPlayerProtectedMinorKilled);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetOtherPlayerProtectedMinorKilled>(host, &AfterCvDiplomacyAI_SetOtherPlayerProtectedMinorKilled);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetOtherPlayerProtectedMinorKilled>(host, &ReplaceCvDiplomacyAI_SetOtherPlayerProtectedMinorKilled);
Code
10019/// Sets who the last Minor that ePlayer Killed that we were protecting is10020void CvDiplomacyAI::SetOtherPlayerProtectedMinorKilled(PlayerTypes ePlayer, PlayerTypes eKilledPlayer)10021{10022 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");10023 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.");10024 CvAssertMsg(eKilledPlayer >= MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");10025 CvAssertMsg(eKilledPlayer < MAX_CIV_PLAYERS, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");10026 m_paiOtherPlayerProtectedMinorKilled[ePlayer] = eKilledPlayer;10027}