Bazaar developer reference

CvPlot::IsAdjacentToPlotType(PlotTypes) const

Defined in
CvPlot.cpp, line 12000
Class
CvPlot
Hook name
CivHooks::CvPlot_IsAdjacentToPlotType

Hooks

static bool BeforeCvPlot_IsAdjacentToPlotType(const CvPlot* self, PlotTypes iPlotType, bool& result);static void AfterCvPlot_IsAdjacentToPlotType(const CvPlot* self, PlotTypes iPlotType, bool& result);static bool ReplaceCvPlot_IsAdjacentToPlotType(bool (*original)(const CvPlot*, PlotTypes), const CvPlot* self, PlotTypes iPlotType);CivRegisterBefore<CivHooks::CvPlot_IsAdjacentToPlotType>(host, &BeforeCvPlot_IsAdjacentToPlotType);CivRegisterAfter<CivHooks::CvPlot_IsAdjacentToPlotType>(host, &AfterCvPlot_IsAdjacentToPlotType);CivRegisterReplace<CivHooks::CvPlot_IsAdjacentToPlotType>(host, &ReplaceCvPlot_IsAdjacentToPlotType);

Code

12000bool CvPlot::IsAdjacentToPlotType(PlotTypes iPlotType) const12001{12002	int iX = getX(); int iY = getY();1200312004	for (int iDirection = 0; iDirection < NUM_DIRECTION_TYPES; iDirection++) {12005		CvPlot* pLoopPlot = plotDirection(iX, iY, (DirectionTypes) iDirection);1200612007		if (pLoopPlot != NULL && pLoopPlot->HasPlotType(iPlotType)) {12008			return true;12009		}12010	}1201112012	return false;12013}

Calls

Called by