Bazaar developer reference

isOtherTeam(const CvUnit *, TeamTypes)

Defined in
CvPlot.cpp, line 3915
Hook name
CivHooks::CvPlot_cpp_isOtherTeam

Hooks

static bool BeforeCvPlot_cpp_isOtherTeam(const CvUnit* pUnit, TeamTypes eOtherTeam, bool& result);static void AfterCvPlot_cpp_isOtherTeam(const CvUnit* pUnit, TeamTypes eOtherTeam, bool& result);static bool ReplaceCvPlot_cpp_isOtherTeam(bool (*original)(const CvUnit*, TeamTypes), const CvUnit* pUnit, TeamTypes eOtherTeam);CivRegisterBefore<CivHooks::CvPlot_cpp_isOtherTeam>(host, &BeforeCvPlot_cpp_isOtherTeam);CivRegisterAfter<CivHooks::CvPlot_cpp_isOtherTeam>(host, &AfterCvPlot_cpp_isOtherTeam);CivRegisterReplace<CivHooks::CvPlot_cpp_isOtherTeam>(host, &ReplaceCvPlot_cpp_isOtherTeam);

Code

3915inline static bool isOtherTeam(const CvUnit* pUnit, TeamTypes eOtherTeam)3916{3917	if(pUnit->canCoexistWithEnemyUnit(eOtherTeam))3918	{3919		return false;3920	}39213922	return (pUnit->getTeam() != eOtherTeam);3923}

Calls

Called by