Example #1
0
        /// <summary>
        /// Starts a search for land sales using the directory
        /// </summary>
        /// <param name="findFlags">A flags parameter that can modify the way
        /// search results are returned, for example changing the ordering of
        /// results or limiting based on price or area</param>
        /// <param name="typeFlags">What type of land to search for. Auction,
        /// estate, mainland, "first land", etc</param>
        /// <param name="priceLimit">Maximum price to search for, the
        /// DirFindFlags.LimitByPrice flag must be set</param>
        /// <param name="areaLimit">Maximum area to search for, the
        /// DirFindFlags.LimitByArea flag must be set</param>
        /// <param name="queryStart">Each request is limited to 100 parcels
        /// being returned. To get the first 100 parcels of a request use 0,
        /// from 100-199 use 100, 200-299 use 200, etc.</param>
        /// <returns>A unique identifier that can identify packets associated
        /// with this query from other queries</returns>
        /// <remarks>The OnDirLandReply event handler must be registered before
        /// calling this function. There is no way to determine how many
        /// results will be returned, or how many times the callback will be
        /// fired other than you won't get more than 100 total parcels from
        /// each query.</remarks>
        public LLUUID StartLandSearch(DirFindFlags findFlags, SearchTypeFlags typeFlags, int priceLimit,
                                      int areaLimit, int queryStart)
        {
            LLUUID queryID = LLUUID.Random();

            DirLandQueryPacket query = new DirLandQueryPacket();

            query.AgentData.AgentID    = Client.Self.AgentID;
            query.AgentData.SessionID  = Client.Self.SessionID;
            query.QueryData.Area       = areaLimit;
            query.QueryData.Price      = priceLimit;
            query.QueryData.QueryStart = queryStart;
            query.QueryData.SearchType = (uint)typeFlags;
            query.QueryData.QueryFlags = (uint)findFlags;
            query.QueryData.QueryID    = queryID;

            Client.Network.SendPacket(query);

            return(queryID);
        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="reservedNewbie"></param>
        /// <param name="forSale"></param>
        /// <param name="auction"></param>
        /// <returns></returns>
        public int DirLandRequest(bool reservedNewbie, bool forSale, bool auction)
        {
            // Set the class-wide variables so the callback has them
//            ReservedNewbie = reservedNewbie; // FIXME FIXME FIXME
//            ForSale = forSale;
//            Auction = auction;

            // Clear the list
            ParcelsForSale.Clear();

            // Start the timer
            DirLandTimeout = false;
            DirLandTimer.Start();

            DirLandQueryPacket query = new DirLandQueryPacket();

            query.AgentData.AgentID   = Client.Network.AgentID;
            query.AgentData.SessionID = Client.Network.SessionID;
//            query.QueryData.Auction = auction; // FIXME FIXME FIXME
//            query.QueryData.ForSale = forSale;
            query.QueryData.QueryFlags = 0;
            query.QueryData.QueryID    = LLUUID.Random();
//            query.QueryData.ReservedNewbie = reservedNewbie; // FIXME FIXME FIXME

            Client.Network.SendPacket((Packet)query);

            while (!DirLandTimeout)
            {
                Client.Tick();
            }

            // Make sure the timer is actually stopped
            DirLandTimer.Stop();

            return(ParcelsForSale.Count);
        }
        /// <summary>
        /// Send a request to the data server for land sales listings
        /// </summary>
        /// 
        /// <param name="findFlags">Flags sent to specify query options
        /// 
        /// Available flags:
        /// Specify the parcel rating with one or more of the following:
        ///     IncludePG IncludeMature IncludeAdult
        /// 
        /// Specify the field to pre sort the results with ONLY ONE of the following:
        ///     PerMeterSort NameSort AreaSort PricesSort
        ///     
        /// Specify the order the results are returned in, if not specified the results are pre sorted in a Descending Order
        ///     SortAsc
        ///     
        /// Specify additional filters to limit the results with one or both of the following:
        ///     LimitByPrice LimitByArea
        ///     
        /// Flags can be combined by separating them with the | (pipe) character
        /// 
        /// Additional details can be found in <see cref="DirFindFlags"/>
        /// </param>
        /// <param name="typeFlags">What type of land to search for. Auction, 
        /// Estate or Mainland</param>
        /// <param name="priceLimit">Maximum price to search for when the 
        /// DirFindFlags.LimitByPrice flag is specified in findFlags</param>
        /// <param name="areaLimit">Maximum area to search for when the
        /// DirFindFlags.LimitByArea flag is specified in findFlags</param>
        /// <param name="queryStart">Each request is limited to 100 parcels
        /// being returned. To get the first 100 parcels of a request use 0,
        /// from 100-199 use 100, 200-299 use 200, etc.</param>
        /// <remarks><para>The <seealso cref="OnDirLandReply"/> event will be raised with the response from the simulator 
        /// 
        /// There is no way to determine how many results will be returned, or how many times the callback will be 
        /// fired other than you won't get more than 100 total parcels from 
        /// each reply.</para>
        /// 
        /// <para>Any land set for sale to either anybody or specific to the connected agent will be included in the
        /// results if the land is included in the query</para></remarks>
        /// <example>
        /// <code>
        /// // request all mainland, any maturity rating that is larger than 512 sq.m
        /// StartLandSearch(DirFindFlags.SortAsc | DirFindFlags.PerMeterSort | DirFindFlags.LimitByArea | DirFindFlags.IncludePG | DirFindFlags.IncludeMature | DirFindFlags.IncludeAdult, SearchTypeFlags.Mainland, 0, 512, 0);
        /// </code></example>
        public void StartLandSearch(DirFindFlags findFlags, SearchTypeFlags typeFlags, int priceLimit,
            int areaLimit, int queryStart)
        {
            DirLandQueryPacket query = new DirLandQueryPacket();
            query.AgentData.AgentID = Client.Self.AgentID;
            query.AgentData.SessionID = Client.Self.SessionID;
            query.QueryData.Area = areaLimit;
            query.QueryData.Price = priceLimit;
            query.QueryData.QueryStart = queryStart;
            query.QueryData.SearchType = (uint)typeFlags;
            query.QueryData.QueryFlags = (uint)findFlags;
            query.QueryData.QueryID = UUID.Random();

            Client.Network.SendPacket(query);
        }
Example #4
0
        /// <summary>
        /// Starts a search for land sales using the directory
        /// </summary>
        /// <param name="findFlags">A flags parameter that can modify the way
        /// search results are returned, for example changing the ordering of
        /// results or limiting based on price or area</param>
        /// <param name="typeFlags">What type of land to search for. Auction, 
        /// estate, mainland, "first land", etc</param>
        /// <param name="priceLimit">Maximum price to search for, the 
        /// DirFindFlags.LimitByPrice flag must be set</param>
        /// <param name="areaLimit">Maximum area to search for, the
        /// DirFindFlags.LimitByArea flag must be set</param>
        /// <param name="queryStart">Each request is limited to 100 parcels
        /// being returned. To get the first 100 parcels of a request use 0,
        /// from 100-199 use 100, 200-299 use 200, etc.</param>
        /// <returns>A unique identifier that can identify packets associated
        /// with this query from other queries</returns>
        /// <remarks>The OnDirLandReply event handler must be registered before
        /// calling this function. There is no way to determine how many 
        /// results will be returned, or how many times the callback will be 
        /// fired other than you won't get more than 100 total parcels from 
        /// each query.</remarks>
        public Guid StartLandSearch(DirFindFlags findFlags, SearchTypeFlags typeFlags, int priceLimit,
            int areaLimit, int queryStart)
        {
            Guid queryID = Guid.NewGuid();

            DirLandQueryPacket query = new DirLandQueryPacket();
            query.AgentData.AgentID = Client.Self.AgentID;
            query.AgentData.SessionID = Client.Self.SessionID;
            query.QueryData.Area = areaLimit;
            query.QueryData.Price = priceLimit;
            query.QueryData.QueryStart = queryStart;
            query.QueryData.SearchType = (uint)typeFlags;
            query.QueryData.QueryFlags = (uint)findFlags;
            query.QueryData.QueryID = queryID;

            Client.Network.SendPacket(query);

            return queryID;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="reservedNewbie"></param>
        /// <param name="forSale"></param>
        /// <param name="auction"></param>
        /// <returns></returns>
        public int DirLandRequest(bool reservedNewbie, bool forSale, bool auction)
        {
            // Set the class-wide variables so the callback has them
            //            ReservedNewbie = reservedNewbie; // FIXME FIXME FIXME
            //            ForSale = forSale;
            //            Auction = auction;

            // Clear the list
            ParcelsForSale.Clear();

            // Start the timer
            DirLandTimeout = false;
            DirLandTimer.Start();

            DirLandQueryPacket query = new DirLandQueryPacket();
            query.AgentData.AgentID = Client.Network.AgentID;
            query.AgentData.SessionID = Client.Network.SessionID;
            //            query.QueryData.Auction = auction; // FIXME FIXME FIXME
            //            query.QueryData.ForSale = forSale;
            query.QueryData.QueryFlags = 0;
            query.QueryData.QueryID = LLUUID.Random();
            //            query.QueryData.ReservedNewbie = reservedNewbie; // FIXME FIXME FIXME

            Client.Network.SendPacket((Packet)query);

            while (!DirLandTimeout)
            {
                Client.Tick();
            }

            // Make sure the timer is actually stopped
            DirLandTimer.Stop();

            return ParcelsForSale.Count;
        }
Example #6
0
        /// <summary>
        /// Starts a search for land sales using the directory
        /// </summary>
        /// <param name="findFlags">A flags parameter that can modify the way
        /// search results are returned, for example changing the ordering of
        /// results or limiting based on price or area</param>
        /// <param name="typeFlags">What type of land to search for. Auction, 
        /// estate, mainland, "first land", etc</param>
        /// <param name="priceLimit">Maximum price to search for, the 
        /// DirFindFlags.LimitByPrice flag must be set</param>
        /// <param name="areaLimit">Maximum area to search for, the
        /// DirFindFlags.LimitByArea flag must be set</param>
        /// <param name="queryStart">Each request is limited to 100 parcels
        /// being returned. To get the first 100 parcels of a request use 0,
        /// from 100-199 use 100, 200-299 use 200, etc.</param>
        /// <returns>A unique identifier that can identify packets associated
        /// with this query from other queries</returns>
        /// <remarks>The OnDirLandReply event handler must be registered before
        /// calling this function. There is no way to determine how many 
        /// results will be returned, or how many times the callback will be 
        /// fired other than you won't get more than 100 total parcels from 
        /// each query.</remarks>
        public UUID StartLandSearch(DirFindFlags findFlags, SearchTypeFlags typeFlags, int priceLimit,
            int areaLimit, int queryStart)
        {
            UUID queryID = UUID.Random();

            DirLandQueryPacket query = new DirLandQueryPacket();
            query.AgentData.AgentID = Network.AgentID;
            query.AgentData.SessionID = Network.SessionID;
            query.QueryData.Area = areaLimit;
            query.QueryData.Price = priceLimit;
            query.QueryData.QueryStart = queryStart;
            query.QueryData.SearchType = (uint)typeFlags;
            query.QueryData.QueryFlags = (uint)findFlags;
            query.QueryData.QueryID = queryID;

            Network.SendPacket(query);

            return queryID;
        }