コード例 #1
0
        /// <summary>
        /// Request a map layer
        /// </summary>
        /// <param name="regionName">The name of the region</param>
        /// <param name="layer">The type of layer</param>
        public void RequestMapRegion(string regionName, GridLayerType layer)
        {
            MapNameRequestPacket request = new MapNameRequestPacket();

            request.AgentData.AgentID   = Client.Self.AgentID;
            request.AgentData.SessionID = Client.Self.SessionID;
            request.AgentData.Flags     = (uint)layer;
            request.AgentData.EstateID  = 0;     // Filled in on the sim
            request.AgentData.Godlike   = false; // Filled in on the sim
            request.NameData.Name       = Utils.StringToBytes(regionName);

            Client.Network.SendPacket(request);
        }
コード例 #2
0
        /// <summary>
        /// If the client does not have data on this region already, request the region data for it
        /// </summary>
        /// <param name="name">Name of the region to add</param>
        public void AddSim(string name)
        {
            name = name.ToLower();

            if (!Regions.ContainsKey(name))
            {
                MapNameRequestPacket map = new MapNameRequestPacket();

                map.AgentData.AgentID   = Client.Network.AgentID;
                map.AgentData.SessionID = Client.Network.SessionID;
                map.NameData.Name       = Helpers.StringToField(name);

                Client.Network.SendPacket(map);
            }
        }
コード例 #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="name">Region Name you're requesting data for</param>
        /// <param name="grc">CallBack being used to process the response</param>
        public void BeginGetGridRegion(string name, GridRegionCallback grc)
        {
            OnRegionAddInternal = grc;

            BeginGetGridRegionName = name.ToLower();

            if (Regions.ContainsKey(BeginGetGridRegionName))
            {
                OnRegionAdd(Regions[BeginGetGridRegionName]);
            }
            else
            {
                MapNameRequestPacket map = new MapNameRequestPacket();

                map.AgentData.AgentID   = Client.Network.AgentID;
                map.AgentData.SessionID = Client.Network.SessionID;
                map.NameData.Name       = Helpers.StringToField(BeginGetGridRegionName);

                Client.Network.SendPacket(map);
            }
        }
コード例 #4
0
ファイル: GridManager.cs プロジェクト: RavenB/gridsearch
        /// <summary>
        /// 
        /// </summary>
        /// <param name="regionName"></param>
        /// <param name="layer"></param>
        public void RequestMapRegion(string regionName, GridLayerType layer)
        {
            MapNameRequestPacket request = new MapNameRequestPacket();

            request.AgentData.AgentID = Client.Self.AgentID;
            request.AgentData.SessionID = Client.Self.SessionID;
            request.AgentData.Flags = (uint)layer;
            request.AgentData.EstateID = 0; // Filled in on the sim
            request.AgentData.Godlike = false; // Filled in on the sim
            request.NameData.Name = Helpers.StringToField(regionName.ToLower());

            Client.Network.SendPacket(request);
        }
コード例 #5
0
        /// <summary>
        /// Begin process to get information for a Region
        /// </summary>
        /// <param name="name">Region Name you're requesting data for</param>
        /// <param name="grc">CallBack being used to process the response</param>
        public void BeginGetGridRegion(string name, GridRegionCallback grc)
        {
            OnRegionAddInternal = grc;

            BeginGetGridRegionName = name.ToLower();

            if (Regions.ContainsKey(BeginGetGridRegionName))
            {
                OnRegionAdd(Regions[BeginGetGridRegionName]);
            }
            else
            {
                MapNameRequestPacket map = new MapNameRequestPacket();

                map.AgentData.AgentID = Client.Network.AgentID;
                map.AgentData.SessionID = Client.Network.SessionID;
                map.NameData.Name = Helpers.StringToField(BeginGetGridRegionName);

                Client.Network.SendPacket(map);
            }
        }
コード例 #6
0
        /// <summary>
        /// If the client does not have data on this region already, request the region data for it
        /// </summary>
        /// <param name="name">Name of the region to add</param>
        public void AddSim(string name)
        {
            name = name.ToLower();

            if(!Regions.ContainsKey(name))
            {
                MapNameRequestPacket map = new MapNameRequestPacket();

                map.AgentData.AgentID = Client.Network.AgentID;
                map.AgentData.SessionID = Client.Network.SessionID;
                map.NameData.Name = Helpers.StringToField(name);

                Client.Network.SendPacket(map);
            }
        }
コード例 #7
0
ファイル: GridManager.cs プロジェクト: RavenB/gridsearch
        public void RequestMapRegion(string regionName)
        {
            MapNameRequestPacket request = new MapNameRequestPacket();

            request.AgentData.AgentID = Client.Network.AgentID;
            request.AgentData.SessionID = Client.Network.SessionID;
            request.NameData.Name = Helpers.StringToField(regionName.ToLower());

            Client.Network.SendPacket(request);
        }