Bazaar developer reference

CvUnit::changeFeatureDoubleMoveCount(FeatureTypes, int)

Defined in
CvUnit.cpp, line 20237
Class
CvUnit
Hook name
CivHooks::CvUnit_changeFeatureDoubleMoveCount

Hooks

static bool BeforeCvUnit_changeFeatureDoubleMoveCount(CvUnit* self, FeatureTypes eIndex, int iChange);static void AfterCvUnit_changeFeatureDoubleMoveCount(CvUnit* self, FeatureTypes eIndex, int iChange);static void ReplaceCvUnit_changeFeatureDoubleMoveCount(void (*original)(CvUnit*, FeatureTypes, int), CvUnit* self, FeatureTypes eIndex, int iChange);CivRegisterBefore<CivHooks::CvUnit_changeFeatureDoubleMoveCount>(host, &BeforeCvUnit_changeFeatureDoubleMoveCount);CivRegisterAfter<CivHooks::CvUnit_changeFeatureDoubleMoveCount>(host, &AfterCvUnit_changeFeatureDoubleMoveCount);CivRegisterReplace<CivHooks::CvUnit_changeFeatureDoubleMoveCount>(host, &ReplaceCvUnit_changeFeatureDoubleMoveCount);

Code

20237void CvUnit::changeFeatureDoubleMoveCount(FeatureTypes eIndex, int iChange)20238{20239	VALIDATE_OBJECT20240	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");20241	CvAssertMsg(eIndex < GC.getNumFeatureInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");20242	m_featureDoubleMoveCount.setAt(eIndex, m_featureDoubleMoveCount[eIndex] + iChange);20243	CvAssert(getFeatureDoubleMoveCount(eIndex) >= 0);20244}

Calls

Called by