Bazaar developer reference

CvUnit::changeExtraMoveDiscount(int)

Defined in
CvUnit.cpp, line 17943
Class
CvUnit
Hook name
CivHooks::CvUnit_changeExtraMoveDiscount

Hooks

static bool BeforeCvUnit_changeExtraMoveDiscount(CvUnit* self, int iChange);static void AfterCvUnit_changeExtraMoveDiscount(CvUnit* self, int iChange);static void ReplaceCvUnit_changeExtraMoveDiscount(void (*original)(CvUnit*, int), CvUnit* self, int iChange);CivRegisterBefore<CivHooks::CvUnit_changeExtraMoveDiscount>(host, &BeforeCvUnit_changeExtraMoveDiscount);CivRegisterAfter<CivHooks::CvUnit_changeExtraMoveDiscount>(host, &AfterCvUnit_changeExtraMoveDiscount);CivRegisterReplace<CivHooks::CvUnit_changeExtraMoveDiscount>(host, &ReplaceCvUnit_changeExtraMoveDiscount);

Code

17943void CvUnit::changeExtraMoveDiscount(int iChange)17944{17945	VALIDATE_OBJECT17946	m_iExtraMoveDiscount = (m_iExtraMoveDiscount + iChange);17947	CvAssert(getExtraMoveDiscount() >= 0);17948}

Calls

Called by