Hooks
static bool BeforeCvDiplomacyAI_SetDiploLogStatementTurnForIndex(CvDiplomacyAI* self, PlayerTypes ePlayer, int iIndex, int iNewValue);static void AfterCvDiplomacyAI_SetDiploLogStatementTurnForIndex(CvDiplomacyAI* self, PlayerTypes ePlayer, int iIndex, int iNewValue);static void ReplaceCvDiplomacyAI_SetDiploLogStatementTurnForIndex(void (*original)(CvDiplomacyAI*, PlayerTypes, int, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iIndex, int iNewValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetDiploLogStatementTurnForIndex>(host, &BeforeCvDiplomacyAI_SetDiploLogStatementTurnForIndex);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetDiploLogStatementTurnForIndex>(host, &AfterCvDiplomacyAI_SetDiploLogStatementTurnForIndex);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetDiploLogStatementTurnForIndex>(host, &ReplaceCvDiplomacyAI_SetDiploLogStatementTurnForIndex);
Code
24536/// Sets the DiploLogStatement turn number associated with the index passed in24537void CvDiplomacyAI::SetDiploLogStatementTurnForIndex(PlayerTypes ePlayer, int iIndex, int iNewValue)24538{24539 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");24540 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.");24541 CvAssertMsg(iIndex >= 0, "DIPLOMACY_AI: Invalid DiploLogStatement Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");24542 CvAssertMsg(iIndex < MAX_DIPLO_LOG_STATEMENTS, "DIPLOMACY_AI: Invalid DiploLogStatement Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");24543 CvAssertMsg(iNewValue >= 0, "DIPLOMACY_AI: Setting DiploLogStatementTurnForIndex to a negative value. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");24544 m_ppaDiploStatementsLog[ePlayer][iIndex].m_iTurn = iNewValue;24545}