Bazaar developer reference

CvUnit::changeAlwaysHealCount(int)

Defined in
CvUnit.cpp, line 17761
Class
CvUnit
Hook name
CivHooks::CvUnit_changeAlwaysHealCount

Hooks

static bool BeforeCvUnit_changeAlwaysHealCount(CvUnit* self, int iChange);static void AfterCvUnit_changeAlwaysHealCount(CvUnit* self, int iChange);static void ReplaceCvUnit_changeAlwaysHealCount(void (*original)(CvUnit*, int), CvUnit* self, int iChange);CivRegisterBefore<CivHooks::CvUnit_changeAlwaysHealCount>(host, &BeforeCvUnit_changeAlwaysHealCount);CivRegisterAfter<CivHooks::CvUnit_changeAlwaysHealCount>(host, &AfterCvUnit_changeAlwaysHealCount);CivRegisterReplace<CivHooks::CvUnit_changeAlwaysHealCount>(host, &ReplaceCvUnit_changeAlwaysHealCount);

Code

17761void CvUnit::changeAlwaysHealCount(int iChange)17762{17763	VALIDATE_OBJECT17764	m_iAlwaysHealCount = (m_iAlwaysHealCount + iChange);17765	CvAssert(getAlwaysHealCount() >= 0);17766}

Calls

Called by