Bazaar developer reference

CvPlayer::hasReadyUnit() const

Defined in
CvPlayer.cpp, line 5290
Class
CvPlayer
Hook name
CivHooks::CvPlayer_hasReadyUnit

Hooks

static bool BeforeCvPlayer_hasReadyUnit(const CvPlayer* self, bool& result);static void AfterCvPlayer_hasReadyUnit(const CvPlayer* self, bool& result);static bool ReplaceCvPlayer_hasReadyUnit(bool (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_hasReadyUnit>(host, &BeforeCvPlayer_hasReadyUnit);CivRegisterAfter<CivHooks::CvPlayer_hasReadyUnit>(host, &AfterCvPlayer_hasReadyUnit);CivRegisterReplace<CivHooks::CvPlayer_hasReadyUnit>(host, &ReplaceCvPlayer_hasReadyUnit);

Code

5290bool CvPlayer::hasReadyUnit() const5291{5292	const CvUnit* pLoopUnit;5293	int iLoop;52945295	for(pLoopUnit = firstUnit(&iLoop); pLoopUnit; pLoopUnit = nextUnit(&iLoop))5296	{5297		if(pLoopUnit->ReadyToMove() && !pLoopUnit->isDelayedDeath())5298		{5299			return true;5300		}5301	}53025303	return false;5304}

Calls

Called by