Bazaar developer reference

CvUnit::IsEverFortifyable() const

Defined in
CvUnit.cpp, line 13875
Class
CvUnit
Hook name
CivHooks::CvUnit_IsEverFortifyable

Hooks

static bool BeforeCvUnit_IsEverFortifyable(const CvUnit* self, bool& result);static void AfterCvUnit_IsEverFortifyable(const CvUnit* self, bool& result);static bool ReplaceCvUnit_IsEverFortifyable(bool (*original)(const CvUnit*), const CvUnit* self);CivRegisterBefore<CivHooks::CvUnit_IsEverFortifyable>(host, &BeforeCvUnit_IsEverFortifyable);CivRegisterAfter<CivHooks::CvUnit_IsEverFortifyable>(host, &AfterCvUnit_IsEverFortifyable);CivRegisterReplace<CivHooks::CvUnit_IsEverFortifyable>(host, &ReplaceCvUnit_IsEverFortifyable);

Code

13874/// Can this Unit EVER fortify? (may be redundant with some other stuff)13875bool CvUnit::IsEverFortifyable() const13876{13877	VALIDATE_OBJECT1387813879	if(!IsCombatUnit() || noDefensiveBonus() || ((getDomainType() != DOMAIN_LAND) && (getDomainType() != DOMAIN_IMMOBILE)))13880	{13881		return false;13882	}1388313884	return true;13885}

Calls

Called by