Bazaar developer reference

CvPlayer::unitsGoldenAgeCapable() const

Defined in
CvPlayer.cpp, line 9923
Class
CvPlayer
Hook name
CivHooks::CvPlayer_unitsGoldenAgeCapable

Hooks

static bool BeforeCvPlayer_unitsGoldenAgeCapable(const CvPlayer* self, int& result);static void AfterCvPlayer_unitsGoldenAgeCapable(const CvPlayer* self, int& result);static int ReplaceCvPlayer_unitsGoldenAgeCapable(int (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_unitsGoldenAgeCapable>(host, &BeforeCvPlayer_unitsGoldenAgeCapable);CivRegisterAfter<CivHooks::CvPlayer_unitsGoldenAgeCapable>(host, &AfterCvPlayer_unitsGoldenAgeCapable);CivRegisterReplace<CivHooks::CvPlayer_unitsGoldenAgeCapable>(host, &ReplaceCvPlayer_unitsGoldenAgeCapable);

Code

9923int CvPlayer::unitsGoldenAgeCapable() const9924{9925	const CvUnit* pLoopUnit;9926	int iCount;9927	int iLoop;99289929	iCount = 0;99309931	for(pLoopUnit = firstUnit(&iLoop); pLoopUnit != NULL; pLoopUnit = nextUnit(&iLoop))9932	{9933		if(pLoopUnit->isGoldenAge())9934		{9935			iCount++;9936		}9937	}99389939	return iCount;9940}

Calls

Called by