CvDiplomacyAI::GetDeclarationLogTurnForIndex(int)
- Defined in
- CvDiplomacyAI.cpp, line 25181
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_GetDeclarationLogTurnForIndex
Hooks
static bool BeforeCvDiplomacyAI_GetDeclarationLogTurnForIndex(CvDiplomacyAI* self, int iIndex, int& result);static void AfterCvDiplomacyAI_GetDeclarationLogTurnForIndex(CvDiplomacyAI* self, int iIndex, int& result);static int ReplaceCvDiplomacyAI_GetDeclarationLogTurnForIndex(int (*original)(CvDiplomacyAI*, int), CvDiplomacyAI* self, int iIndex);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetDeclarationLogTurnForIndex>(host, &BeforeCvDiplomacyAI_GetDeclarationLogTurnForIndex);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetDeclarationLogTurnForIndex>(host, &AfterCvDiplomacyAI_GetDeclarationLogTurnForIndex);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetDeclarationLogTurnForIndex>(host, &ReplaceCvDiplomacyAI_GetDeclarationLogTurnForIndex);
Code
25180/// Returns the DeclarationLog turn number associated with the index passed in25181int CvDiplomacyAI::GetDeclarationLogTurnForIndex(int iIndex)25182{25183 CvAssertMsg(iIndex >= 0, "DIPLOMACY_AI: Invalid DiploLogStatement Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");25184 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.");25185 return m_paDeclarationsLog[iIndex].m_iTurn;25186}