Bazaar developer reference

CvPlayerCulture::GetNumGreatWorks() const

Defined in
CvCultureClasses.cpp, line 947
Class
CvPlayerCulture
Hook name
CivHooks::CvPlayerCulture_GetNumGreatWorks

Hooks

static bool BeforeCvPlayerCulture_GetNumGreatWorks(const CvPlayerCulture* self, int& result);static void AfterCvPlayerCulture_GetNumGreatWorks(const CvPlayerCulture* self, int& result);static int ReplaceCvPlayerCulture_GetNumGreatWorks(int (*original)(const CvPlayerCulture*), const CvPlayerCulture* self);CivRegisterBefore<CivHooks::CvPlayerCulture_GetNumGreatWorks>(host, &BeforeCvPlayerCulture_GetNumGreatWorks);CivRegisterAfter<CivHooks::CvPlayerCulture_GetNumGreatWorks>(host, &AfterCvPlayerCulture_GetNumGreatWorks);CivRegisterReplace<CivHooks::CvPlayerCulture_GetNumGreatWorks>(host, &ReplaceCvPlayerCulture_GetNumGreatWorks);

Code

946/// How many Great Works are in the entire empure?947int CvPlayerCulture::GetNumGreatWorks() const948{949	CvCity* pLoopCity = NULL;950	int iLoop = 0;951	int iRtnValue = 0;952953	for(pLoopCity = m_pPlayer->firstCity(&iLoop); pLoopCity != NULL; pLoopCity = m_pPlayer->nextCity(&iLoop))954	{955		iRtnValue += pLoopCity->GetCityCulture()->GetNumGreatWorks();956	}957958	return iRtnValue;959}

Calls

Called by