Bazaar developer reference

CvPlot::IsAdjacentOwnedByOtherTeam(TeamTypes) const

Defined in
CvPlot.cpp, line 3217
Class
CvPlot
Hook name
CivHooks::CvPlot_IsAdjacentOwnedByOtherTeam

Hooks

static bool BeforeCvPlot_IsAdjacentOwnedByOtherTeam(const CvPlot* self, TeamTypes eTeam, bool& result);static void AfterCvPlot_IsAdjacentOwnedByOtherTeam(const CvPlot* self, TeamTypes eTeam, bool& result);static bool ReplaceCvPlot_IsAdjacentOwnedByOtherTeam(bool (*original)(const CvPlot*, TeamTypes), const CvPlot* self, TeamTypes eTeam);CivRegisterBefore<CivHooks::CvPlot_IsAdjacentOwnedByOtherTeam>(host, &BeforeCvPlot_IsAdjacentOwnedByOtherTeam);CivRegisterAfter<CivHooks::CvPlot_IsAdjacentOwnedByOtherTeam>(host, &AfterCvPlot_IsAdjacentOwnedByOtherTeam);CivRegisterReplace<CivHooks::CvPlot_IsAdjacentOwnedByOtherTeam>(host, &ReplaceCvPlot_IsAdjacentOwnedByOtherTeam);

Code

3217bool CvPlot::IsAdjacentOwnedByOtherTeam(TeamTypes eTeam) const3218{3219	CvPlot* pAdjacentPlot;3220	int iI;32213222	for(iI = 0; iI < NUM_DIRECTION_TYPES; ++iI)3223	{3224		pAdjacentPlot = plotDirection(getX(), getY(), ((DirectionTypes)iI));32253226		if(pAdjacentPlot != NULL)3227		{3228			if(pAdjacentPlot->getTeam() != NO_TEAM && pAdjacentPlot->getTeam() != eTeam)3229			{3230				return true;3231			}3232		}3233	}32343235	return false;32363237}

Calls

Called by