Bazaar developer reference

CvUnit::movesLeft() const

Defined in
CvUnit.cpp, line 11657
Class
CvUnit
Hook name
CivHooks::CvUnit_movesLeft

Hooks

static bool BeforeCvUnit_movesLeft(const CvUnit* self, int& result);static void AfterCvUnit_movesLeft(const CvUnit* self, int& result);static int ReplaceCvUnit_movesLeft(int (*original)(const CvUnit*), const CvUnit* self);CivRegisterBefore<CivHooks::CvUnit_movesLeft>(host, &BeforeCvUnit_movesLeft);CivRegisterAfter<CivHooks::CvUnit_movesLeft>(host, &AfterCvUnit_movesLeft);CivRegisterReplace<CivHooks::CvUnit_movesLeft>(host, &ReplaceCvUnit_movesLeft);

Code

11657int CvUnit::movesLeft() const11658{11659	VALIDATE_OBJECT11660	return std::max(0, getMoves());11661}

Calls

Called by