Bazaar developer reference

CvPlayerCulture::GetNumGreatWorkSlots() const

Defined in
CvCultureClasses.cpp, line 962
Class
CvPlayerCulture
Hook name
CivHooks::CvPlayerCulture_GetNumGreatWorkSlots

Hooks

static bool BeforeCvPlayerCulture_GetNumGreatWorkSlots(const CvPlayerCulture* self, int& result);static void AfterCvPlayerCulture_GetNumGreatWorkSlots(const CvPlayerCulture* self, int& result);static int ReplaceCvPlayerCulture_GetNumGreatWorkSlots(int (*original)(const CvPlayerCulture*), const CvPlayerCulture* self);CivRegisterBefore<CivHooks::CvPlayerCulture_GetNumGreatWorkSlots>(host, &BeforeCvPlayerCulture_GetNumGreatWorkSlots);CivRegisterAfter<CivHooks::CvPlayerCulture_GetNumGreatWorkSlots>(host, &AfterCvPlayerCulture_GetNumGreatWorkSlots);CivRegisterReplace<CivHooks::CvPlayerCulture_GetNumGreatWorkSlots>(host, &ReplaceCvPlayerCulture_GetNumGreatWorkSlots);

Code

961/// How many Great Work slots are in the entire empire?962int CvPlayerCulture::GetNumGreatWorkSlots() const963{964	CvCity* pLoopCity = NULL;965	int iLoop = 0;966	int iRtnValue = 0;967968	for(pLoopCity = m_pPlayer->firstCity(&iLoop); pLoopCity != NULL; pLoopCity = m_pPlayer->nextCity(&iLoop))969	{970		iRtnValue += pLoopCity->GetCityCulture()->GetNumGreatWorkSlots();971	}972973	return iRtnValue;974}

Calls

Called by