Bazaar developer reference

CvUnit::changeAlwaysHostileCount(int)

Defined in
CvUnit.cpp, line 22143
Class
CvUnit
Hook name
CivHooks::CvUnit_changeAlwaysHostileCount

Hooks

static bool BeforeCvUnit_changeAlwaysHostileCount(CvUnit* self, int iValue);static void AfterCvUnit_changeAlwaysHostileCount(CvUnit* self, int iValue);static void ReplaceCvUnit_changeAlwaysHostileCount(void (*original)(CvUnit*, int), CvUnit* self, int iValue);CivRegisterBefore<CivHooks::CvUnit_changeAlwaysHostileCount>(host, &BeforeCvUnit_changeAlwaysHostileCount);CivRegisterAfter<CivHooks::CvUnit_changeAlwaysHostileCount>(host, &AfterCvUnit_changeAlwaysHostileCount);CivRegisterReplace<CivHooks::CvUnit_changeAlwaysHostileCount>(host, &ReplaceCvUnit_changeAlwaysHostileCount);

Code

22143void CvUnit::changeAlwaysHostileCount(int iValue)22144{22145	VALIDATE_OBJECT22146	m_iAlwaysHostileCount += iValue;22147	CvAssert(getAlwaysHostileCount() >= 0);22148}

Calls

Called by