Bazaar developer reference

CvDiplomacyAI::GetDeclarationLogData2ForIndex(int)

Defined in
CvDiplomacyAI.cpp, line 25133
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetDeclarationLogData2ForIndex

Hooks

static bool BeforeCvDiplomacyAI_GetDeclarationLogData2ForIndex(CvDiplomacyAI* self, int iIndex, int& result);static void AfterCvDiplomacyAI_GetDeclarationLogData2ForIndex(CvDiplomacyAI* self, int iIndex, int& result);static int ReplaceCvDiplomacyAI_GetDeclarationLogData2ForIndex(int (*original)(CvDiplomacyAI*, int), CvDiplomacyAI* self, int iIndex);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetDeclarationLogData2ForIndex>(host, &BeforeCvDiplomacyAI_GetDeclarationLogData2ForIndex);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetDeclarationLogData2ForIndex>(host, &AfterCvDiplomacyAI_GetDeclarationLogData2ForIndex);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetDeclarationLogData2ForIndex>(host, &ReplaceCvDiplomacyAI_GetDeclarationLogData2ForIndex);

Code

25132/// Returns the DeclarationLog iData2 number associated with the index passed in25133int CvDiplomacyAI::GetDeclarationLogData2ForIndex(int iIndex)25134{25135	CvAssertMsg(iIndex >= 0, "DIPLOMACY_AI: Invalid DiploLogStatement Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");25136	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.");25137	return m_paDeclarationsLog[iIndex].m_iData2;25138}

Called by