Bazaar developer reference

CvPlayer::GetCountReadyUnits() const

Defined in
CvPlayer.cpp, line 5307
Class
CvPlayer
Hook name
CivHooks::CvPlayer_GetCountReadyUnits

Hooks

static bool BeforeCvPlayer_GetCountReadyUnits(const CvPlayer* self, int& result);static void AfterCvPlayer_GetCountReadyUnits(const CvPlayer* self, int& result);static int ReplaceCvPlayer_GetCountReadyUnits(int (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_GetCountReadyUnits>(host, &BeforeCvPlayer_GetCountReadyUnits);CivRegisterAfter<CivHooks::CvPlayer_GetCountReadyUnits>(host, &AfterCvPlayer_GetCountReadyUnits);CivRegisterReplace<CivHooks::CvPlayer_GetCountReadyUnits>(host, &ReplaceCvPlayer_GetCountReadyUnits);

Code

5307int CvPlayer::GetCountReadyUnits() const5308{5309	int iRtnValue = 0;5310	const CvUnit* pLoopUnit;5311	int iLoop;53125313	for(pLoopUnit = firstUnit(&iLoop); pLoopUnit; pLoopUnit = nextUnit(&iLoop))5314	{5315		if(pLoopUnit->ReadyToMove() && !pLoopUnit->isDelayedDeath())5316		{5317			iRtnValue++;5318		}5319	}53205321	return iRtnValue;5322}

Calls

Called by