Bazaar developer reference

CvUnit::IsAngerFreeUnit() const

Defined in
CvUnit.cpp, line 3397
Class
CvUnit
Hook name
CivHooks::CvUnit_IsAngerFreeUnit

Hooks

static bool BeforeCvUnit_IsAngerFreeUnit(const CvUnit* self, bool& result);static void AfterCvUnit_IsAngerFreeUnit(const CvUnit* self, bool& result);static bool ReplaceCvUnit_IsAngerFreeUnit(bool (*original)(const CvUnit*), const CvUnit* self);CivRegisterBefore<CivHooks::CvUnit_IsAngerFreeUnit>(host, &BeforeCvUnit_IsAngerFreeUnit);CivRegisterAfter<CivHooks::CvUnit_IsAngerFreeUnit>(host, &AfterCvUnit_IsAngerFreeUnit);CivRegisterReplace<CivHooks::CvUnit_IsAngerFreeUnit>(host, &ReplaceCvUnit_IsAngerFreeUnit);

Code

3396/// Does this unit not3397bool CvUnit::IsAngerFreeUnit() const3398{3399	// If it's a "rival territory" Unit (e.g. Caravel) don't worry about it3400	if(isRivalTerritory())3401		return true;34023403	// Don't care about noncombat units3404	if(!IsCombatUnit())3405		return true;34063407	// We don't care about other Minors or the Barbs3408	if(GET_PLAYER(getOwner()).isMinorCiv())3409		return true;34103411	// We don't care about other Minors or the Barbs3412	if(GET_PLAYER(getOwner()).isBarbarian())3413		return true;34143415	return false;3416}

Calls

Called by