Bazaar developer reference

CvDiplomacyAI::GetDiploLogStatementTurnForIndex(PlayerTypes, int)

Defined in
CvDiplomacyAI.cpp, line 24526
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetDiploLogStatementTurnForIndex

Hooks

static bool BeforeCvDiplomacyAI_GetDiploLogStatementTurnForIndex(CvDiplomacyAI* self, PlayerTypes ePlayer, int iIndex, int& result);static void AfterCvDiplomacyAI_GetDiploLogStatementTurnForIndex(CvDiplomacyAI* self, PlayerTypes ePlayer, int iIndex, int& result);static int ReplaceCvDiplomacyAI_GetDiploLogStatementTurnForIndex(int (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iIndex);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetDiploLogStatementTurnForIndex>(host, &BeforeCvDiplomacyAI_GetDiploLogStatementTurnForIndex);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetDiploLogStatementTurnForIndex>(host, &AfterCvDiplomacyAI_GetDiploLogStatementTurnForIndex);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetDiploLogStatementTurnForIndex>(host, &ReplaceCvDiplomacyAI_GetDiploLogStatementTurnForIndex);

Code

24525/// Returns the DiploLogStatement turn number associated with the index passed in24526int CvDiplomacyAI::GetDiploLogStatementTurnForIndex(PlayerTypes ePlayer, int iIndex)24527{24528	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");24529	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.");24530	CvAssertMsg(iIndex >= 0, "DIPLOMACY_AI: Invalid DiploLogStatement Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");24531	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.");2453224533	return m_ppaDiploStatementsLog[ePlayer][iIndex].m_iTurn;24534}

Called by