Bazaar developer reference

CvPlayer::CountAllWorkedPlotType(PlotTypes)

Defined in
CvPlayer.cpp, line 28594
Class
CvPlayer
Hook name
CivHooks::CvPlayer_CountAllWorkedPlotType

Hooks

static bool BeforeCvPlayer_CountAllWorkedPlotType(CvPlayer* self, PlotTypes iPlotType, int& result);static void AfterCvPlayer_CountAllWorkedPlotType(CvPlayer* self, PlotTypes iPlotType, int& result);static int ReplaceCvPlayer_CountAllWorkedPlotType(int (*original)(CvPlayer*, PlotTypes), CvPlayer* self, PlotTypes iPlotType);CivRegisterBefore<CivHooks::CvPlayer_CountAllWorkedPlotType>(host, &BeforeCvPlayer_CountAllWorkedPlotType);CivRegisterAfter<CivHooks::CvPlayer_CountAllWorkedPlotType>(host, &AfterCvPlayer_CountAllWorkedPlotType);CivRegisterReplace<CivHooks::CvPlayer_CountAllWorkedPlotType>(host, &ReplaceCvPlayer_CountAllWorkedPlotType);

Code

28594int CvPlayer::CountAllWorkedPlotType(PlotTypes iPlotType)28595{28596	int iCount = 0;28597	28598	int iLoop;28599	for (CvCity* pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop)) {28600		iCount += pLoopCity->CountWorkedPlotType(iPlotType);28601	}28602	28603	return iCount;28604}

Calls

Called by