Bazaar developer reference

CvPlayer::getBusyUnit() const

Defined in
CvPlayer.cpp, line 5433
Class
CvPlayer
Hook name
CivHooks::CvPlayer_getBusyUnit

Hooks

static bool BeforeCvPlayer_getBusyUnit(const CvPlayer* self, UnitHandle& result);static void AfterCvPlayer_getBusyUnit(const CvPlayer* self, UnitHandle& result);static const UnitHandle ReplaceCvPlayer_getBusyUnit(const UnitHandle (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_getBusyUnit>(host, &BeforeCvPlayer_getBusyUnit);CivRegisterAfter<CivHooks::CvPlayer_getBusyUnit>(host, &AfterCvPlayer_getBusyUnit);CivRegisterReplace<CivHooks::CvPlayer_getBusyUnit>(host, &ReplaceCvPlayer_getBusyUnit);

Code

5433const UnitHandle CvPlayer::getBusyUnit() const5434{5435	const UnitHandle result;5436	const CvUnit* pLoopUnit;5437	int iLoop;54385439	for(pLoopUnit = firstUnit(&iLoop); pLoopUnit; pLoopUnit = nextUnit(&iLoop))5440	{5441		if(pLoopUnit->IsBusy())5442		{5443			result = pLoopUnit;5444		}5445	}5446	return result;5447}

Calls