public bool IsParcelClaimable(int start_x, int start_y, int end_x, int end_y)
        {
            ParcelInfo pInfo;

            if (!Parcels.TryGetValue(new Vector3(start_x, start_y, 0), out pInfo))
            {
                return(false);
            }

            ParcelInfo.ParcelDataLandBitmap bmap = pInfo.LandBitmap;
            if (!bmap[start_x, end_y - 1] || !bmap[end_x - 1, start_x] || !bmap[end_x - 1, end_y - 1])
            {
                /* not dividable */
                return(false);
            }

            start_x &= (~3);
            start_y &= (~3);
            end_x   &= (~3);
            end_y   &= (~3);
            for (int py = start_y; py < end_y; py += 4)
            {
                for (int px = start_x; px < end_x; px += 4)
                {
                    if (!bmap[px, py])
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }
        public bool DivideParcel(UGUI requestingAgent, int start_x, int start_y, int end_x, int end_y)
        {
            ParcelInfo pInfo;

            if (!Parcels.TryGetValue(new Vector3(start_x, start_y, 0), out pInfo))
            {
                return(false);
            }
            ParcelInfo.ParcelDataLandBitmap bmap = pInfo.LandBitmap;
            if (!bmap[start_x, end_y - 1] || !bmap[end_x - 1, start_x] || !bmap[end_x - 1, end_y - 1])
            {
                /* not dividable */
                return(false);
            }

            start_x &= (~3);
            start_y &= (~3);
            end_x   &= (~3);
            end_y   &= (~3);
            for (int py = start_y; py < end_y; py += 4)
            {
                for (int px = start_x; px < end_x; px += 4)
                {
                    if (!bmap[px, py])
                    {
                        return(false);
                    }
                }
            }

            if (!CanDivideJoinParcel(requestingAgent, pInfo))
            {
                return(false);
            }

            var newParcel = new ParcelInfo(pInfo, true);

            newParcel.ID = UUID.Random;
            Parcels.Add(newParcel);
            ParcelInfo.ParcelDataLandBitmap newBmap = newParcel.LandBitmap;
            for (int py = start_y; py < end_y; ++py)
            {
                for (int px = start_x; px < end_x; ++px)
                {
                    newBmap[px, py] = true;
                    bmap[px, py]    = false;
                }
            }
            TriggerParcelUpdate(pInfo);
            TriggerParcelUpdate(newParcel);
            return(true);
        }
        public bool ClaimParcel(UGUI requestingAgent, int start_x, int start_y, int end_x, int end_y, int soldforprice)
        {
            ParcelInfo pInfo;

            if (!Parcels.TryGetValue(new Vector3(start_x, start_y, 0), out pInfo))
            {
                return(false);
            }
            ParcelInfo.ParcelDataLandBitmap bmap = pInfo.LandBitmap;
            if (!bmap[start_x, end_y - 1] || !bmap[end_x - 1, start_x] || !bmap[end_x - 1, end_y - 1])
            {
                /* not dividable */
                return(false);
            }

            start_x &= (~3);
            start_y &= (~3);
            end_x   &= (~3);
            end_y   &= (~3);
            for (int py = start_y; py < end_y; py += 4)
            {
                for (int px = start_x; px < end_x; px += 4)
                {
                    if (!bmap[px, py])
                    {
                        return(false);
                    }
                }
            }

            if (!pInfo.Owner.EqualsGrid(UGUI.Unknown))
            {
                return(false);
            }

            var newParcel = new ParcelInfo(pInfo, true);

            newParcel.ID         = UUID.Random;
            newParcel.Owner      = requestingAgent;
            newParcel.Group      = UGI.Unknown;
            newParcel.GroupOwned = false;
            newParcel.ClaimDate  = Date.Now;
            newParcel.ClaimPrice = soldforprice;
            newParcel.SalePrice  = 0;
            newParcel.AuthBuyer  = UGUI.Unknown;
            newParcel.Flags     &= ~(ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory);

            Parcels.Add(newParcel);
            ParcelInfo.ParcelDataLandBitmap newBmap = newParcel.LandBitmap;
            for (int py = start_y; py < end_y; ++py)
            {
                for (int px = start_x; px < end_x; ++px)
                {
                    newBmap[px, py] = true;
                    bmap[px, py]    = false;
                }
            }
            TriggerParcelUpdate(pInfo);
            TriggerParcelUpdate(newParcel);
            return(true);
        }