Bazaar developer reference

CvNotifications::EndOfTurnCleanup()

Defined in
CvNotifications.cpp, line 368
Class
CvNotifications
Hook name
CivHooks::CvNotifications_EndOfTurnCleanup

Hooks

static bool BeforeCvNotifications_EndOfTurnCleanup(CvNotifications* self);static void AfterCvNotifications_EndOfTurnCleanup(CvNotifications* self);static void ReplaceCvNotifications_EndOfTurnCleanup(void (*original)(CvNotifications*), CvNotifications* self);CivRegisterBefore<CivHooks::CvNotifications_EndOfTurnCleanup>(host, &BeforeCvNotifications_EndOfTurnCleanup);CivRegisterAfter<CivHooks::CvNotifications_EndOfTurnCleanup>(host, &AfterCvNotifications_EndOfTurnCleanup);CivRegisterReplace<CivHooks::CvNotifications_EndOfTurnCleanup>(host, &ReplaceCvNotifications_EndOfTurnCleanup);

Code

367// EndOfTurnCleanup - called from within CvPlayer at the end of turn368void CvNotifications::EndOfTurnCleanup(void)369{370	int iIndex = m_iNotificationsBeginIndex;371	while(iIndex != m_iNotificationsEndIndex)372	{373		if(!m_aNotifications[iIndex].m_bDismissed)374		{375			if(IsNotificationEndOfTurnExpired(iIndex))376			{377				if (m_aNotifications[iIndex].m_bWaitExtraTurn)378					m_aNotifications[iIndex].m_bWaitExtraTurn = false;379				else380					Dismiss(m_aNotifications[iIndex].m_iLookupIndex, /*bUserInvoked*/ false);381			}382		}383384		iIndex++;385386		if(iIndex >= (int)m_aNotifications.size())387		{388			iIndex = 0;389		}390	}391}

Calls

Called by