Bazaar developer reference

CvPlayer::CountAllFeature(FeatureTypes)

Defined in
CvPlayer.cpp, line 28534
Class
CvPlayer
Hook name
CivHooks::CvPlayer_CountAllFeature

Hooks

static bool BeforeCvPlayer_CountAllFeature(CvPlayer* self, FeatureTypes iFeatureType, int& result);static void AfterCvPlayer_CountAllFeature(CvPlayer* self, FeatureTypes iFeatureType, int& result);static int ReplaceCvPlayer_CountAllFeature(int (*original)(CvPlayer*, FeatureTypes), CvPlayer* self, FeatureTypes iFeatureType);CivRegisterBefore<CivHooks::CvPlayer_CountAllFeature>(host, &BeforeCvPlayer_CountAllFeature);CivRegisterAfter<CivHooks::CvPlayer_CountAllFeature>(host, &AfterCvPlayer_CountAllFeature);CivRegisterReplace<CivHooks::CvPlayer_CountAllFeature>(host, &ReplaceCvPlayer_CountAllFeature);

Code

28534int CvPlayer::CountAllFeature(FeatureTypes iFeatureType)28535{28536	int iCount = 0;28537	28538	int iLoop;28539	for (CvCity* pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop)) {28540		iCount += pLoopCity->CountFeature(iFeatureType);28541	}28542	28543	return iCount;28544}

Calls

Called by