Bazaar developer reference

CvPlot::getNumAdjacentNonvisible(TeamTypes) const

Defined in
CvPlot.cpp, line 3652
Class
CvPlot
Hook name
CivHooks::CvPlot_getNumAdjacentNonvisible

Hooks

static bool BeforeCvPlot_getNumAdjacentNonvisible(const CvPlot* self, TeamTypes eTeam, int& result);static void AfterCvPlot_getNumAdjacentNonvisible(const CvPlot* self, TeamTypes eTeam, int& result);static int ReplaceCvPlot_getNumAdjacentNonvisible(int (*original)(const CvPlot*, TeamTypes), const CvPlot* self, TeamTypes eTeam);CivRegisterBefore<CivHooks::CvPlot_getNumAdjacentNonvisible>(host, &BeforeCvPlot_getNumAdjacentNonvisible);CivRegisterAfter<CivHooks::CvPlot_getNumAdjacentNonvisible>(host, &AfterCvPlot_getNumAdjacentNonvisible);CivRegisterReplace<CivHooks::CvPlot_getNumAdjacentNonvisible>(host, &ReplaceCvPlot_getNumAdjacentNonvisible);

Code

3652int CvPlot::getNumAdjacentNonvisible(TeamTypes eTeam) const3653{3654	CvPlot* pAdjacentPlot;3655	int iCount = 0;36563657	for(int iI = 0; iI < NUM_DIRECTION_TYPES; ++iI)3658	{3659		pAdjacentPlot = plotDirection(getX(), getY(), ((DirectionTypes)iI));36603661		if(pAdjacentPlot != NULL)3662		{3663			if(!pAdjacentPlot->isVisible(eTeam))3664			{3665				iCount++;3666			}3667		}3668	}36693670	return iCount;3671}

Calls