Bazaar developer reference

CvUnit::canRebase(const CvPlot *) const

Defined in
CvUnit.cpp, line 7425
Class
CvUnit
Hook name
CivHooks::CvUnit_canRebase

Hooks

static bool BeforeCvUnit_canRebase(const CvUnit* self, const CvPlot* arg0, bool& result);static void AfterCvUnit_canRebase(const CvUnit* self, const CvPlot* arg0, bool& result);static bool ReplaceCvUnit_canRebase(bool (*original)(const CvUnit*, const CvPlot*), const CvUnit* self, const CvPlot* arg0);CivRegisterBefore<CivHooks::CvUnit_canRebase>(host, &BeforeCvUnit_canRebase);CivRegisterAfter<CivHooks::CvUnit_canRebase>(host, &AfterCvUnit_canRebase);CivRegisterReplace<CivHooks::CvUnit_canRebase>(host, &ReplaceCvUnit_canRebase);

Code

7425bool CvUnit::canRebase(const CvPlot* /*pPlot*/) const7426{7427	// Must be an air unit7428	if(getDomainType() != DOMAIN_AIR)7429	{7430		return false;7431	}74327433	// Must be an "immobile" air unit (e.g. no helicopters)7434	if(!IsImmobile())7435	{7436		return false;7437	}74387439	// Must have movement points left this turn7440	if(getMoves() <= 0)7441	{7442		return false;7443	}74447445	return true;7446}

Calls

Called by