Bazaar developer reference

CvPlot::getNumAdjacentNonrevealed(TeamTypes) const

Defined in
CvPlot.cpp, line 9613
Class
CvPlot
Hook name
CivHooks::CvPlot_getNumAdjacentNonrevealed

Hooks

static bool BeforeCvPlot_getNumAdjacentNonrevealed(const CvPlot* self, TeamTypes eTeam, int& result);static void AfterCvPlot_getNumAdjacentNonrevealed(const CvPlot* self, TeamTypes eTeam, int& result);static int ReplaceCvPlot_getNumAdjacentNonrevealed(int (*original)(const CvPlot*, TeamTypes), const CvPlot* self, TeamTypes eTeam);CivRegisterBefore<CivHooks::CvPlot_getNumAdjacentNonrevealed>(host, &BeforeCvPlot_getNumAdjacentNonrevealed);CivRegisterAfter<CivHooks::CvPlot_getNumAdjacentNonrevealed>(host, &AfterCvPlot_getNumAdjacentNonrevealed);CivRegisterReplace<CivHooks::CvPlot_getNumAdjacentNonrevealed>(host, &ReplaceCvPlot_getNumAdjacentNonrevealed);

Code

9613int CvPlot::getNumAdjacentNonrevealed(TeamTypes eTeam) const9614{9615	CvPlot* pAdjacentPlot;9616	int iCount = 0;96179618	for(int i = 0; i < NUM_DIRECTION_TYPES; ++i)9619	{9620		pAdjacentPlot = plotDirection(getX(), getY(), ((DirectionTypes)i));96219622		if(pAdjacentPlot != NULL)9623		{9624			if(!pAdjacentPlot->isRevealed(eTeam))9625			{9626				iCount++;9627			}9628		}9629	}96309631	return iCount;9632}

Calls

Called by