} if (!Movement->validNPCMove (x, y, z, pc_s)) { pc_s->blocked = pcBlocked; return false; } pc_s->blocked = pcBlocked; cRegion::RegionIterator4Items ri (Coord_cl (x, y, 0, pos.map)); for (ri.Begin (); !ri.atEnd (); ri++) { P_ITEM pi = ri.GetData (); if (pi == NULL) { continue; } if ((ishouse (pi->id ())) && (pi->pos.x==x) && (pi->pos.y==y)) { return false; }
bool CheckBuildSite(const Coord_cl& pos, int sx, int sy){	signed int checkz;	//char statc;	int checkx;	int checky;	int ycount=0;	checkx=pos.x-abs(sx/2);	for (;checkx<(pos.x+abs(sx/2));checkx++)	{		checky=pos.y-(sy/2);		for (;checky<(pos.y+(sy/2));checky++)		{			checkz=Map->MapElevation( Coord_cl( checkx,checky, pos.z, pos.map));			if ((checkz<(pos.z-7)) || (checkz>(pos.z+7)))			{				return false;			}		}	}	return true;}