Bazaar developer reference

CvGame::GetNumArchaeologySites() const

Defined in
CvGame.cpp, line 11492
Class
CvGame
Hook name
CivHooks::CvGame_GetNumArchaeologySites

Hooks

static bool BeforeCvGame_GetNumArchaeologySites(const CvGame* self, int& result);static void AfterCvGame_GetNumArchaeologySites(const CvGame* self, int& result);static int ReplaceCvGame_GetNumArchaeologySites(int (*original)(const CvGame*), const CvGame* self);CivRegisterBefore<CivHooks::CvGame_GetNumArchaeologySites>(host, &BeforeCvGame_GetNumArchaeologySites);CivRegisterAfter<CivHooks::CvGame_GetNumArchaeologySites>(host, &AfterCvGame_GetNumArchaeologySites);CivRegisterReplace<CivHooks::CvGame_GetNumArchaeologySites>(host, &ReplaceCvGame_GetNumArchaeologySites);

Code

11492int CvGame::GetNumArchaeologySites() const11493{11494	if (!IsArchaeologyTriggered())11495	{11496		return -1;11497	}1149811499	int iRtnValue = 0;11500	int iPlotLoop;11501	CvPlot *pPlot;11502	for (iPlotLoop = 0; iPlotLoop < GC.getMap().numPlots(); iPlotLoop++)11503	{11504		pPlot = GC.getMap().plotByIndexUnchecked(iPlotLoop);11505		if (pPlot->getResourceType() == GC.getARTIFACT_RESOURCE())11506		{11507			iRtnValue++;11508		}11509	}11510	return iRtnValue;11511}

Calls

Called by