Bazaar developer reference

CvUnit::changeExtraAttacks(int)

Defined in
CvUnit.cpp, line 18542
Class
CvUnit
Hook name
CivHooks::CvUnit_changeExtraAttacks

Hooks

static bool BeforeCvUnit_changeExtraAttacks(CvUnit* self, int iChange);static void AfterCvUnit_changeExtraAttacks(CvUnit* self, int iChange);static void ReplaceCvUnit_changeExtraAttacks(void (*original)(CvUnit*, int), CvUnit* self, int iChange);CivRegisterBefore<CivHooks::CvUnit_changeExtraAttacks>(host, &BeforeCvUnit_changeExtraAttacks);CivRegisterAfter<CivHooks::CvUnit_changeExtraAttacks>(host, &AfterCvUnit_changeExtraAttacks);CivRegisterReplace<CivHooks::CvUnit_changeExtraAttacks>(host, &ReplaceCvUnit_changeExtraAttacks);

Code

18542void CvUnit::changeExtraAttacks(int iChange)18543{18544	VALIDATE_OBJECT18545	if(iChange != 0)18546	{18547		m_iNumAttacks += iChange;1854818549		setInfoBarDirty(true);18550	}18551}

Calls

Called by