Bazaar developer reference

CvNotifications::GetNumNotifications()

Defined in
CvNotifications.cpp, line 810
Class
CvNotifications
Hook name
CivHooks::CvNotifications_GetNumNotifications

Hooks

static bool BeforeCvNotifications_GetNumNotifications(CvNotifications* self, int& result);static void AfterCvNotifications_GetNumNotifications(CvNotifications* self, int& result);static int ReplaceCvNotifications_GetNumNotifications(int (*original)(CvNotifications*), CvNotifications* self);CivRegisterBefore<CivHooks::CvNotifications_GetNumNotifications>(host, &BeforeCvNotifications_GetNumNotifications);CivRegisterAfter<CivHooks::CvNotifications_GetNumNotifications>(host, &AfterCvNotifications_GetNumNotifications);CivRegisterReplace<CivHooks::CvNotifications_GetNumNotifications>(host, &ReplaceCvNotifications_GetNumNotifications);

Code

810int CvNotifications::GetNumNotifications(void)811{812	if(m_iNotificationsEndIndex >= m_iNotificationsBeginIndex)813	{814		int iValue = m_iNotificationsEndIndex - m_iNotificationsBeginIndex;815		return iValue;816	}817818	int iValue = (m_aNotifications.size() - m_iNotificationsBeginIndex) + m_iNotificationsEndIndex;819	return iValue;820}

Calls

Called by