Bazaar developer reference

CvPlayer::CountAllPlotType(PlotTypes)

Defined in
CvPlayer.cpp, line 28582
Class
CvPlayer
Hook name
CivHooks::CvPlayer_CountAllPlotType

Hooks

static bool BeforeCvPlayer_CountAllPlotType(CvPlayer* self, PlotTypes iPlotType, int& result);static void AfterCvPlayer_CountAllPlotType(CvPlayer* self, PlotTypes iPlotType, int& result);static int ReplaceCvPlayer_CountAllPlotType(int (*original)(CvPlayer*, PlotTypes), CvPlayer* self, PlotTypes iPlotType);CivRegisterBefore<CivHooks::CvPlayer_CountAllPlotType>(host, &BeforeCvPlayer_CountAllPlotType);CivRegisterAfter<CivHooks::CvPlayer_CountAllPlotType>(host, &AfterCvPlayer_CountAllPlotType);CivRegisterReplace<CivHooks::CvPlayer_CountAllPlotType>(host, &ReplaceCvPlayer_CountAllPlotType);

Code

28582int CvPlayer::CountAllPlotType(PlotTypes iPlotType)28583{28584	int iCount = 0;28585	28586	int iLoop;28587	for (CvCity* pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop)) {28588		iCount += pLoopCity->CountPlotType(iPlotType);28589	}28590	28591	return iCount;28592}

Calls

Called by