Bazaar developer reference

CvUnit::canSiege(TeamTypes) const

Defined in
CvUnit.cpp, line 12730
Class
CvUnit
Hook name
CivHooks::CvUnit_canSiege

Hooks

static bool BeforeCvUnit_canSiege(const CvUnit* self, TeamTypes eTeam, bool& result);static void AfterCvUnit_canSiege(const CvUnit* self, TeamTypes eTeam, bool& result);static bool ReplaceCvUnit_canSiege(bool (*original)(const CvUnit*, TeamTypes), const CvUnit* self, TeamTypes eTeam);CivRegisterBefore<CivHooks::CvUnit_canSiege>(host, &BeforeCvUnit_canSiege);CivRegisterAfter<CivHooks::CvUnit_canSiege>(host, &AfterCvUnit_canSiege);CivRegisterReplace<CivHooks::CvUnit_canSiege>(host, &ReplaceCvUnit_canSiege);

Code

12730bool CvUnit::canSiege(TeamTypes eTeam) const12731{12732	VALIDATE_OBJECT12733	if(!IsCanDefend())12734	{12735		return false;12736	}1273712738	if(!isEnemy(eTeam))12739	{12740		return false;12741	}1274212743	if(!isNeverInvisible())12744	{12745		return false;12746	}1274712748	return true;12749}

Calls

Called by