Bazaar developer reference

CvUnit::isAlwaysHostile(const CvPlot &) const

Defined in
CvUnit.cpp, line 22152
Class
CvUnit
Hook name
CivHooks::CvUnit_isAlwaysHostile

Hooks

static bool BeforeCvUnit_isAlwaysHostile(const CvUnit* self, const CvPlot& plot, bool& result);static void AfterCvUnit_isAlwaysHostile(const CvUnit* self, const CvPlot& plot, bool& result);static bool ReplaceCvUnit_isAlwaysHostile(bool (*original)(const CvUnit*, const CvPlot&), const CvUnit* self, const CvPlot& plot);CivRegisterBefore<CivHooks::CvUnit_isAlwaysHostile>(host, &BeforeCvUnit_isAlwaysHostile);CivRegisterAfter<CivHooks::CvUnit_isAlwaysHostile>(host, &AfterCvUnit_isAlwaysHostile);CivRegisterReplace<CivHooks::CvUnit_isAlwaysHostile>(host, &ReplaceCvUnit_isAlwaysHostile);

Code

22152bool CvUnit::isAlwaysHostile(const CvPlot& plot) const22153{22154	VALIDATE_OBJECT22155	if(plot.isCity())22156	{22157		return false;22158	}2215922160	return (getAlwaysHostileCount() > 0);22161}

Calls

Called by