Bazaar developer reference

CvDiplomacyAI::SetDeclarationLogTurnForIndex(int, int)

Defined in
CvDiplomacyAI.cpp, line 25189
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_SetDeclarationLogTurnForIndex

Hooks

static bool BeforeCvDiplomacyAI_SetDeclarationLogTurnForIndex(CvDiplomacyAI* self, int iIndex, int iNewValue);static void AfterCvDiplomacyAI_SetDeclarationLogTurnForIndex(CvDiplomacyAI* self, int iIndex, int iNewValue);static void ReplaceCvDiplomacyAI_SetDeclarationLogTurnForIndex(void (*original)(CvDiplomacyAI*, int, int), CvDiplomacyAI* self, int iIndex, int iNewValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetDeclarationLogTurnForIndex>(host, &BeforeCvDiplomacyAI_SetDeclarationLogTurnForIndex);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetDeclarationLogTurnForIndex>(host, &AfterCvDiplomacyAI_SetDeclarationLogTurnForIndex);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetDeclarationLogTurnForIndex>(host, &ReplaceCvDiplomacyAI_SetDeclarationLogTurnForIndex);

Code

25188/// Sets the DeclarationLog turn number associated with the index passed in25189void CvDiplomacyAI::SetDeclarationLogTurnForIndex(int iIndex, int iNewValue)25190{25191	CvAssertMsg(iIndex >= 0, "DIPLOMACY_AI: Invalid DiploLogStatement Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");25192	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.");25193	m_paDeclarationsLog[iIndex].m_iTurn = iNewValue;25194}

Called by