Bazaar developer reference

CvGame::GetNumHiddenArchaeologySites() const

Defined in
CvGame.cpp, line 11513
Class
CvGame
Hook name
CivHooks::CvGame_GetNumHiddenArchaeologySites

Hooks

static bool BeforeCvGame_GetNumHiddenArchaeologySites(const CvGame* self, int& result);static void AfterCvGame_GetNumHiddenArchaeologySites(const CvGame* self, int& result);static int ReplaceCvGame_GetNumHiddenArchaeologySites(int (*original)(const CvGame*), const CvGame* self);CivRegisterBefore<CivHooks::CvGame_GetNumHiddenArchaeologySites>(host, &BeforeCvGame_GetNumHiddenArchaeologySites);CivRegisterAfter<CivHooks::CvGame_GetNumHiddenArchaeologySites>(host, &AfterCvGame_GetNumHiddenArchaeologySites);CivRegisterReplace<CivHooks::CvGame_GetNumHiddenArchaeologySites>(host, &ReplaceCvGame_GetNumHiddenArchaeologySites);

Code

11513int CvGame::GetNumHiddenArchaeologySites() const11514{11515	if (!IsArchaeologyTriggered())11516	{11517		return -1;11518	}1151911520	int iRtnValue = 0;11521	int iPlotLoop;11522	CvPlot *pPlot;11523	for (iPlotLoop = 0; iPlotLoop < GC.getMap().numPlots(); iPlotLoop++)11524	{11525		pPlot = GC.getMap().plotByIndexUnchecked(iPlotLoop);11526		if (pPlot->getResourceType() == GC.getHIDDEN_ARTIFACT_RESOURCE())11527		{11528			iRtnValue++;11529		}11530	}11531	return iRtnValue;11532}

Calls

Called by