Hooks
static bool BeforeCvDiplomacyAI_SetSentAttackProtectedMinorTaunt(CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eMinor, bool bValue);static void AfterCvDiplomacyAI_SetSentAttackProtectedMinorTaunt(CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eMinor, bool bValue);static void ReplaceCvDiplomacyAI_SetSentAttackProtectedMinorTaunt(void (*original)(CvDiplomacyAI*, PlayerTypes, PlayerTypes, bool), CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eMinor, bool bValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetSentAttackProtectedMinorTaunt>(host, &BeforeCvDiplomacyAI_SetSentAttackProtectedMinorTaunt);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetSentAttackProtectedMinorTaunt>(host, &AfterCvDiplomacyAI_SetSentAttackProtectedMinorTaunt);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetSentAttackProtectedMinorTaunt>(host, &ReplaceCvDiplomacyAI_SetSentAttackProtectedMinorTaunt);
Code
24470/// Set flag for whether we have sent a message to ePlayer about attacking their protected eMinor24471void CvDiplomacyAI::SetSentAttackProtectedMinorTaunt(PlayerTypes ePlayer, PlayerTypes eMinor, bool bValue)24472{24473 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Anton your save file and version.");24474 CvAssertMsg(ePlayer < MAX_CIV_PLAYERS, "DIPLOMACY_AI: Invalid Player Index. Please send Anton your save file and version.");24475 CvAssertMsg(eMinor >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Anton your save file and version.");24476 CvAssertMsg(eMinor < MAX_CIV_PLAYERS, "DIPLOMACY_AI: Invalid Player Index. Please send Anton your save file and version.");24477 m_ppaabSentAttackMessageToMinorCivProtector[ePlayer][eMinor] = bValue;24478}