Bazaar developer reference

CvPlot::isAdjacentOwned() const

Defined in
CvPlot.cpp, line 3169
Class
CvPlot
Hook name
CivHooks::CvPlot_isAdjacentOwned

Hooks

static bool BeforeCvPlot_isAdjacentOwned(const CvPlot* self, bool& result);static void AfterCvPlot_isAdjacentOwned(const CvPlot* self, bool& result);static bool ReplaceCvPlot_isAdjacentOwned(bool (*original)(const CvPlot*), const CvPlot* self);CivRegisterBefore<CivHooks::CvPlot_isAdjacentOwned>(host, &BeforeCvPlot_isAdjacentOwned);CivRegisterAfter<CivHooks::CvPlot_isAdjacentOwned>(host, &AfterCvPlot_isAdjacentOwned);CivRegisterReplace<CivHooks::CvPlot_isAdjacentOwned>(host, &ReplaceCvPlot_isAdjacentOwned);

Code

3169bool CvPlot::isAdjacentOwned() const3170{3171	CvPlot* pAdjacentPlot;3172	int iI;31733174	for(iI = 0; iI < NUM_DIRECTION_TYPES; ++iI)3175	{3176		pAdjacentPlot = plotDirection(getX(), getY(), ((DirectionTypes)iI));31773178		if(pAdjacentPlot != NULL)3179		{3180			if(pAdjacentPlot->getOwner() != NO_PLAYER)3181			{3182				return true;3183			}3184		}3185	}31863187	return false;3188}

Calls

Called by