Bazaar developer reference

CvEventLog::GetTurn(int) const

Defined in
CvEventLog.cpp, line 175
Class
CvEventLog
Hook name
CivHooks::CvEventLog_GetTurn

Hooks

static bool BeforeCvEventLog_GetTurn(const CvEventLog* self, int iZeroBasedIndex, int& result);static void AfterCvEventLog_GetTurn(const CvEventLog* self, int iZeroBasedIndex, int& result);static int ReplaceCvEventLog_GetTurn(int (*original)(const CvEventLog*, int), const CvEventLog* self, int iZeroBasedIndex);CivRegisterBefore<CivHooks::CvEventLog_GetTurn>(host, &BeforeCvEventLog_GetTurn);CivRegisterAfter<CivHooks::CvEventLog_GetTurn>(host, &AfterCvEventLog_GetTurn);CivRegisterReplace<CivHooks::CvEventLog_GetTurn>(host, &ReplaceCvEventLog_GetTurn);

Code

175int CvEventLog::GetTurn(int iZeroBasedIndex) const176{177	int iRealIndex = (m_iEventsBeginIndex + iZeroBasedIndex) % m_aEvents.size();178	return m_aEvents[iRealIndex].m_iTurn;179}

Calls

Called by