Bazaar developer reference

CvPlayer::hasAutoUnit() const

Defined in
CvPlayer.cpp, line 5357
Class
CvPlayer
Hook name
CivHooks::CvPlayer_hasAutoUnit

Hooks

static bool BeforeCvPlayer_hasAutoUnit(const CvPlayer* self, bool& result);static void AfterCvPlayer_hasAutoUnit(const CvPlayer* self, bool& result);static bool ReplaceCvPlayer_hasAutoUnit(bool (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_hasAutoUnit>(host, &BeforeCvPlayer_hasAutoUnit);CivRegisterAfter<CivHooks::CvPlayer_hasAutoUnit>(host, &AfterCvPlayer_hasAutoUnit);CivRegisterReplace<CivHooks::CvPlayer_hasAutoUnit>(host, &ReplaceCvPlayer_hasAutoUnit);

Code

5357bool CvPlayer::hasAutoUnit() const5358{5359	const CvUnit* pLoopUnit;5360	int iLoop;53615362	for(pLoopUnit = firstUnit(&iLoop); pLoopUnit; pLoopUnit = nextUnit(&iLoop))5363	{5364		if(pLoopUnit->ReadyToAuto())5365		{5366			return true;5367		}5368	}53695370	return false;5371}

Calls

Called by