• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# LandData类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中LandData的典型用法代码示例。如果您正苦于以下问题:C# LandData类的具体用法?C# LandData怎么用?C# LandData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LandData类属于命名空间,在下文中一共展示了LandData类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AddLandObject

        /// <summary>
        /// This also updates the parcel, not for just adding a new one
        /// </summary>
        /// <param name="args"></param>
        /// <param name="regionID"></param>
        /// <param name="forSale"></param>
        /// <param name="EstateID"></param>
        /// <param name="showInSearch"></param>
        public void AddLandObject(LandData args)
        {
            //Check whether this region is just spamming add to search and stop them if they are
            if (timeBeforeNextUpdate.ContainsKey(args.InfoUUID) &&
                Util.UnixTimeSinceEpoch() < timeBeforeNextUpdate[args.InfoUUID])
                return; //Too soon to update

            //Update the time with now + the time to wait for the next update
            timeBeforeNextUpdate[args.InfoUUID] = Util.UnixTimeSinceEpoch() + (60 * minTimeBeforeNextParcelUpdate);
            
            List<object> Values = new List<object>();
            Values.Add(args.RegionID);
            Values.Add(args.GlobalID);
            Values.Add(args.LocalID);
            Values.Add(args.UserLocation.X);
            Values.Add(args.UserLocation.Y);
            Values.Add(args.UserLocation.Z);
            Values.Add(args.Name);
            Values.Add(args.Description);
            Values.Add(args.Flags);
            Values.Add(args.Dwell);
            //InfoUUID is the missing 'real' Gridwide ParcelID
            Values.Add(args.InfoUUID);
            Values.Add(((args.Flags & (uint)ParcelFlags.ForSale) == (uint)ParcelFlags.ForSale) ? 1 : 0);
            Values.Add(args.SalePrice);
            Values.Add(args.AuctionID);
            Values.Add(args.Area);
            Values.Add(0);
            Values.Add(args.Maturity);
            Values.Add(args.OwnerID);
            Values.Add(args.GroupID);
            Values.Add(((args.Flags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory) ? 1 : 0);
            Values.Add(args.SnapshotID);

            List<string> Keys = new List<string>();
            Keys.Add("RegionID");
            Keys.Add("ParcelID");
            Keys.Add("LocalID");
            Keys.Add("LandingX");
            Keys.Add("LandingY");
            Keys.Add("LandingZ");
            Keys.Add("Name");
            Keys.Add("Description");
            Keys.Add("Flags");
            Keys.Add("Dwell");
            Keys.Add("InfoUUID");
            Keys.Add("ForSale");
            Keys.Add("SalePrice");
            Keys.Add("Auction");
            Keys.Add("Area");
            Keys.Add("EstateID");
            Keys.Add("Maturity");
            Keys.Add("OwnerID");
            Keys.Add("GroupID");
            Keys.Add("ShowInSearch");
            Keys.Add("SnapshotID");

            GD.Replace("searchparcel", Keys.ToArray(), Values.ToArray());
        }
开发者ID:WordfromtheWise,项目名称:Aurora,代码行数:67,代码来源:LocalDirectoryServiceConnector.cs


示例2: AddLandObject

 /// <summary>
 /// This also updates the parcel, not for just adding a new one
 /// </summary>
 /// <param name="args"></param>
 /// <param name="regionID"></param>
 /// <param name="forSale"></param>
 /// <param name="EstateID"></param>
 /// <param name="showInSearch"></param>
 public void AddLandObject(LandData args)
 {
     OSDMap mess = args.ToOSD ();
     mess["Method"] = "addlandobject";
     List<string> m_ServerURIs = m_registry.RequestModuleInterface<IConfigurationService>().FindValueOf("RemoteServerURI");
     foreach (string m_ServerURI in m_ServerURIs)
     {
         WebUtils.PostToService (m_ServerURI + "osd", mess, false, false);
     }
 }
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:18,代码来源:RemoteDirectoryServiceConnector.cs


示例3: AddLandObject

        /// <summary>
        /// This also updates the parcel, not for just adding a new one
        /// </summary>
        /// <param name="args"></param>
        /// <param name="regionID"></param>
        /// <param name="forSale"></param>
        /// <param name="EstateID"></param>
        /// <param name="showInSearch"></param>
        public void AddLandObject(LandData args)
        {
            Dictionary<string, object> sendData = args.ToKeyValuePairs();

            sendData["METHOD"] = "addlandobject";

            string reqString = ServerUtils.BuildXmlResponse(sendData);

            try
            {
                SynchronousRestFormsRequester.MakeRequest("POST",
                        m_ServerURI + "/auroradata",
                        reqString);
            }
            catch (Exception e)
            {
                m_log.DebugFormat("[AuroraRemoteDirectoryServiceConnector]: Exception when contacting server: {0}", e.Message);
            }
        }
开发者ID:shangcheng,项目名称:Aurora,代码行数:27,代码来源:RemoteDirectoryServiceConnector.cs


示例4: SaveParcelAccessList

 private void SaveParcelAccessList(LandData data)
 {
     foreach (ParcelManager.ParcelAccessEntry entry in data.ParcelAccessList)
     {
         GD.Replace("parcelaccess", new string[]
         {
             "ParcelID",
             "AccessID",
             "Flags",
             "Time"
         }
         ,
         new object[]
         {
             data.GlobalID,
             entry.AgentID,
             entry.Flags,
             entry.Time.Ticks
         });
     }
 }
开发者ID:shangcheng,项目名称:Aurora,代码行数:21,代码来源:LocalParcelServiceConnector.cs


示例5: AddLandObject

        /// <summary>
        /// This also updates the parcel, not for just adding a new one
        /// </summary>
        /// <param name="args"></param>
        /// <param name="regionID"></param>
        /// <param name="forSale"></param>
        /// <param name="EstateID"></param>
        /// <param name="showInSearch"></param>
        public void AddLandObject(LandData args)
        {
            Dictionary<string, object> sendData = args.ToKeyValuePairs();

            sendData["METHOD"] = "addlandobject";

            string reqString = WebUtils.BuildXmlResponse(sendData);

            try
            {
                List<string> m_ServerURIs = m_registry.RequestModuleInterface<IConfigurationService>().FindValueOf("RemoteServerURI");
                foreach (string m_ServerURI in m_ServerURIs)
                {
                    AsynchronousRestObjectRequester.MakeRequest("POST",
                           m_ServerURI,
                           reqString);
                }
            }
            catch (Exception e)
            {
                m_log.DebugFormat("[AuroraRemoteDirectoryServiceConnector]: Exception when contacting server: {0}", e.ToString());
            }
        }
开发者ID:kow,项目名称:Aurora-Sim,代码行数:31,代码来源:RemoteDirectoryServiceConnector.cs


示例6: SaveParcelAccessList

 /// <summary>
 /// Save this parcel's access list 
 /// </summary>
 /// <param name="data"></param>
 private void SaveParcelAccessList(LandData data)
 {
     //Clear out all old parcel bans and access list entries
     GD.Delete("parcelaccess", new string[] { "ParcelID" }, new object[] { data.GlobalID });
     foreach (ParcelManager.ParcelAccessEntry entry in data.ParcelAccessList)
     {
         //Replace all the old ones
         GD.Replace("parcelaccess", new string[]
         {
             "ParcelID",
             "AccessID",
             "Flags",
             "Time"
         }
         ,
         new object[]
         {
             data.GlobalID,
             entry.AgentID,
             entry.Flags,
             entry.Time.Ticks
         });
     }
 }
开发者ID:x8ball,项目名称:Aurora-Sim,代码行数:28,代码来源:LocalParcelServiceConnector.cs


示例7: BuildParcelAccessList

 private void BuildParcelAccessList(LandData LandData)
 {
     List<string> Query = GD.Query("ParcelID", LandData.GlobalID, "parcelaccess", "AccessID, Flags, Time");
     int i = 0;
     int dataCount = 0;
     ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
     foreach (string retVal in Query)
     {
         if (dataCount == 0)
             entry.AgentID = UUID.Parse(Query[i]);
         if (dataCount == 1)
             entry.Flags = (AccessList)int.Parse(Query[i]);
         if (dataCount == 2)
             entry.Time = new DateTime(long.Parse(Query[i]));
         dataCount++;
         i++;
         if (dataCount == 3)
         {
             LandData.ParcelAccessList.Add(entry);
             entry = new ParcelManager.ParcelAccessEntry();
             dataCount = 0;
         }
     }
 }
开发者ID:shangcheng,项目名称:Aurora,代码行数:24,代码来源:LocalParcelServiceConnector.cs


示例8: GetParcelInfo

 public LandData GetParcelInfo(UUID InfoUUID)
 {
     List<string> Query = GD.Query("InfoUUID", InfoUUID, "searchparcel", "*");
     LandData LandData = new LandData();
     if (Query.Count == 0)
         return null;
     LandData.RegionID = UUID.Parse(Query[0]);
     LandData.GlobalID = UUID.Parse(Query[1]);
     LandData.LocalID = int.Parse(Query[2]);
     LandData.UserLocation = Vector3.Parse(Query[3]);
     LandData.Name = Query[6];
     LandData.Description = Query[7];
     LandData.Flags = uint.Parse(Query[8]);
     LandData.Dwell = int.Parse(Query[9]);
     LandData.InfoUUID = UUID.Parse(Query[10]);
     LandData.AuctionID = uint.Parse(Query[13]);
     LandData.Area = int.Parse(Query[14]);
     LandData.Maturity = int.Parse(Query[16]);
     LandData.OwnerID = UUID.Parse(Query[17]);
     LandData.GroupID = UUID.Parse(Query[18]);
     LandData.SnapshotID = UUID.Parse(Query[20]);
     return LandData;
 }
开发者ID:shangcheng,项目名称:Aurora,代码行数:23,代码来源:LocalDirectoryServiceConnector.cs


示例9: Duplicate

 public override IDataTransferable Duplicate()
 {
     LandData m = new LandData();
     m.FromOSD(ToOSD());
     return m;
 }
开发者ID:NickyPerian,项目名称:Aurora-Sim,代码行数:6,代码来源:LandData.cs


示例10: Copy

        /// <summary>
        /// Make a new copy of the land data
        /// </summary>
        /// <returns></returns>
        public LandData Copy()
        {
            LandData landData = new LandData();

            landData._AABBMax = _AABBMax;
            landData._AABBMin = _AABBMin;
            landData._area = _area;
            landData._auctionID = _auctionID;
            landData._authBuyerID = _authBuyerID;
            landData._category = _category;
            landData._claimDate = _claimDate;
            landData._claimPrice = _claimPrice;
            landData._globalID = _globalID;
            landData._groupID = _groupID;
            landData._isGroupOwned = _isGroupOwned;
            landData._localID = _localID;
            landData._landingType = _landingType;
            landData._mediaAutoScale = _mediaAutoScale;
            landData._mediaID = _mediaID;
            landData._mediaURL = _mediaURL;
            landData._musicURL = _musicURL;
            landData._ownerID = _ownerID;
            landData._bitmap = (byte[]) _bitmap.Clone();
            landData._description = _description;
            landData._flags = _flags;
            landData._name = _name;
            landData._status = _status;
            landData._passHours = _passHours;
            landData._passPrice = _passPrice;
            landData._salePrice = _salePrice;
            landData._snapshotID = _snapshotID;
            landData._userLocation = _userLocation;
            landData._userLookAt = _userLookAt;
            landData._otherCleanTime = _otherCleanTime;
            landData._dwell = _dwell;
            landData._mediaType = _mediaType;
            landData._mediaDescription = _mediaDescription;
            landData._mediaWidth = _mediaWidth;
            landData._mediaHeight = _mediaHeight;
            landData._mediaLoop = _mediaLoop;
            landData._MediaLoopSet = _MediaLoopSet;
            landData._obscureMusic = _obscureMusic;
            landData._obscureMedia = _obscureMedia;
            landData._regionID = _regionID;
            landData._regionHandle = _regionHandle;
            landData._infoUUID = _infoUUID;
            landData._Maturity = _Maturity;
            landData._private = _private;

            landData._parcelAccessList.Clear();
            foreach (ParcelManager.ParcelAccessEntry entry in _parcelAccessList)
            {
                ParcelManager.ParcelAccessEntry newEntry = new ParcelManager.ParcelAccessEntry();
                newEntry.AgentID = entry.AgentID;
                newEntry.Flags = entry.Flags;
                newEntry.Time = entry.Time;

                landData._parcelAccessList.Add(newEntry);
            }

            return landData;
        }
开发者ID:NickyPerian,项目名称:Aurora-Sim,代码行数:66,代码来源:LandData.cs


示例11: TileData

        // Issue 5 - End
        static TileData()
        {
            using (FileStream fileStream = FileManager.GetFile("tiledata.mul"))
            {
                BinaryReader bin = new BinaryReader(fileStream);

                LandData landData;
                ItemData itemData;

                if (fileStream.Length == 3188736)
                { // 7.0.9.0
                    LandData = new LandData[0x4000];

                    for (int i = 0; i < 0x4000; ++i)
                    {
                        landData = new LandData();

                        if (i == 1 || (i > 0 && (i & 0x1F) == 0))
                        {
                            bin.ReadInt32();
                        }

                        TileFlag flags = (TileFlag)bin.ReadInt64();

                        int iTextureID = bin.ReadInt16();

                        bin.BaseStream.Seek(20, SeekOrigin.Current);

                        landData.Flags = flags;
                        landData.TextureID = iTextureID;

                        LandData[i] = landData;
                    }

                    ItemData = new ItemData[0x10000];

                    for (int i = 0; i < 0x10000; ++i)
                    {
                        itemData = new ItemData();

                        if ((i & 0x1F) == 0)
                        {
                            bin.ReadInt32();
                        }

                        itemData.Flags = (TileFlag)bin.ReadInt64();
                        itemData.Weight = bin.ReadByte();
                        itemData.Quality = bin.ReadByte();

                        itemData.Unknown1 = bin.ReadByte();
                        itemData.Unknown2 = bin.ReadByte();
                        itemData.Unknown3 = bin.ReadByte();

                        itemData.Quantity = bin.ReadByte();
                        itemData.AnimID = bin.ReadInt16();

                        bin.BaseStream.Seek(2, SeekOrigin.Current); // hue?
                        itemData.Unknown4 = bin.ReadByte();

                        itemData.Value = bin.ReadByte();
                        itemData.Height = bin.ReadByte();

                        itemData.Name = ASCIIEncoding.ASCII.GetString((bin.ReadBytes(20)));
                        itemData.Name = itemData.Name.Trim('\0');
                        // binaryReader.BaseStream.Seek(20, SeekOrigin.Current);

                        // Issue 5 - Statics (bridge, stairs, etc) should be walkable - http://code.google.com/p/ultimaxna/issues/detail?id=5 - Smjert
                        if (i > 1005 && i < 7640)
                            itemData.IsStairs = !(Array.BinarySearch(m_StairsID, i) < 0);
                        // Issue 5 - End

                        ItemData[i] = itemData;
                    }
                }
                else
                {
                    LandData = new LandData[0x4000];

                    for (int i = 0; i < 0x4000; ++i)
                    {

                        landData = new LandData();

                        if ((i & 0x1F) == 0)
                        {
                            bin.ReadInt32();
                        }

                        TileFlag flags = (TileFlag)bin.ReadInt32();

                        int iTextureID = bin.ReadInt16();

                        bin.BaseStream.Seek(20, SeekOrigin.Current);

                        landData.Flags = flags;
                        landData.TextureID = iTextureID;

                        LandData[i] = landData;
                    }
//.........这里部分代码省略.........
开发者ID:jorsi,项目名称:UltimaXNA,代码行数:101,代码来源:TileData.cs


示例12: LoadModuleFromArchive

            public void LoadModuleFromArchive(byte[] data, string filePath, TarArchiveReader.TarEntryType type, IScene scene)
            {
                if (filePath.StartsWith("parcels/"))
                {
                    if (!m_merge)
                    {
                        //Only use if we are not merging
                        LandData parcel = new LandData();
                        OSD parcelData = OSDParser.DeserializeLLSDBinary(data);
                        parcel.FromOSD((OSDMap)parcelData);
                        m_parcels.Add(parcel);
                    }
                }
                #region New Style Terrain Loading
                else if (filePath.StartsWith ("newstyleterrain/"))
                {
                    ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();
                    terrainModule.TerrainMap = ReadTerrain(data, scene);
                }
                else if (filePath.StartsWith ("newstylerevertterrain/"))
                {
                    ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();
                    terrainModule.TerrainRevertMap = ReadTerrain(data, scene);
                }
                else if (filePath.StartsWith ("newstylewater/"))
                {
                    ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();
                    terrainModule.TerrainWaterMap = ReadTerrain(data, scene);
                }
                else if (filePath.StartsWith ("newstylerevertwater/"))
                {
                    ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();
                    terrainModule.TerrainWaterRevertMap = ReadTerrain(data, scene);
                }
                #endregion
                else if (filePath.StartsWith ("terrain/"))
                {
                    ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();

                    MemoryStream ms = new MemoryStream (data);
                    terrainModule.LoadFromStream (filePath, ms, 0, 0);
                    ms.Close ();
                }
                else if (filePath.StartsWith ("revertterrain/"))
                {
                    ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();

                    MemoryStream ms = new MemoryStream (data);
                    terrainModule.LoadRevertMapFromStream (filePath, ms, 0, 0);
                    ms.Close ();
                }
                else if (filePath.StartsWith ("water/"))
                {
                    ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();

                    MemoryStream ms = new MemoryStream (data);
                    terrainModule.LoadWaterFromStream (filePath, ms, 0, 0);
                    ms.Close ();
                }
                else if (filePath.StartsWith ("revertwater/"))
                {
                    ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();

                    MemoryStream ms = new MemoryStream (data);
                    terrainModule.LoadWaterRevertMapFromStream (filePath, ms, 0, 0);
                    ms.Close ();
                }
                else if (filePath.StartsWith ("entities/"))
                {
                    MemoryStream ms = new MemoryStream (data);
                    SceneObjectGroup sceneObject = OpenSim.Region.Framework.Scenes.Serialization.SceneObjectSerializer.FromXml2Format (ref ms, scene);
                    ms.Close ();
                    ms = null;
                    data = null;
                    foreach(ISceneChildEntity part in sceneObject.ChildrenEntities())
                    {
                        if (!ResolveUserUuid (part.CreatorID))
                            part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner;

                        if (!ResolveUserUuid (part.OwnerID))
                            part.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;

                        if (!ResolveUserUuid (part.LastOwnerID))
                            part.LastOwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;

                        // Fix ownership/creator of inventory items
                        // Not doing so results in inventory items
                        // being no copy/no mod for everyone
                        lock (part.TaskInventory)
                        {
                            TaskInventoryDictionary inv = part.TaskInventory;
                            foreach (KeyValuePair<UUID, TaskInventoryItem> kvp in inv)
                            {
                                if (!ResolveUserUuid (kvp.Value.OwnerID))
                                {
                                    kvp.Value.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
                                }
                                if (!ResolveUserUuid (kvp.Value.CreatorID))
                                {
                                    kvp.Value.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;
//.........这里部分代码省略.........
开发者ID:NickyPerian,项目名称:Aurora-Sim,代码行数:101,代码来源:Backup.cs


示例13: GetParcelInfo

        /// <summary>
        /// Gets a parcel from the search database by Info UUID (the true cross instance parcel ID)
        /// </summary>
        /// <param name="ParcelID"></param>
        /// <returns></returns>
        public LandData GetParcelInfo(UUID InfoUUID)
        {
            //Get info about a specific parcel somewhere in the metaverse
            List<string> Query = GD.Query("InfoUUID", InfoUUID, "searchparcel", "*");
            //Cant find it, return
            if (Query.Count == 0)
                return null;

            //Parse and return
            LandData LandData = new LandData();
            LandData.RegionID = UUID.Parse(Query[0]);
            LandData.GlobalID = UUID.Parse(Query[1]);
            LandData.LocalID = int.Parse(Query[2]);
            LandData.UserLocation = new Vector3(float.Parse(Query[3]), float.Parse(Query[4]), float.Parse(Query[5]));
            LandData.Name = Query[6];
            LandData.Description = Query[7];
            LandData.Flags = uint.Parse(Query[8]);
            LandData.Dwell = int.Parse(Query[9]);
            LandData.InfoUUID = UUID.Parse(Query[10]);
            LandData.AuctionID = uint.Parse(Query[13]);
            LandData.Area = int.Parse(Query[14]);
            LandData.Maturity = int.Parse(Query[16]);
            LandData.OwnerID = UUID.Parse(Query[17]);
            LandData.GroupID = UUID.Parse(Query[18]);
            LandData.SnapshotID = UUID.Parse(Query[20]);
            return LandData;
        }
开发者ID:WordfromtheWise,项目名称:Aurora,代码行数:32,代码来源:LocalDirectoryServiceConnector.cs


示例14: GetParcelInfo

        /// <summary>
        /// Gets a parcel from the search database by Info UUID (the true cross instance parcel ID)
        /// </summary>
        /// <param name="ParcelID"></param>
        /// <returns></returns>
        public LandData GetParcelInfo(UUID InfoUUID)
        {
            //Split the InfoUUID so that we get the regions, we'll check for positions in a bit
            int RegionX, RegionY;
            uint X, Y;
            ulong RegionHandle;
            Util.ParseFakeParcelID (InfoUUID, out RegionHandle, out X, out Y);

            Util.UlongToInts (RegionHandle, out RegionX, out RegionY);

            OpenSim.Services.Interfaces.GridRegion r = m_registry.RequestModuleInterface<IGridService> ().GetRegionByPosition (UUID.Zero, (int)RegionX, (int)RegionY);
            if (r == null)
            {
                m_log.Warn("[DirectoryService]: Could not find region for ParcelID: " + InfoUUID);
                return null;
            }
            //Get info about a specific parcel somewhere in the metaverse
            List<string> Query = GD.Query("RegionID", r.RegionID, "searchparcel", "*");
            //Cant find it, return
            if (Query.Count == 0)
                return null;

            List<LandData> Lands = new List<LandData>();
            //Parse and return
            LandData LandData = new LandData();
            //Add all the parcels belonging to the owner to the list
            for (int i = 0; i < Query.Count; i += 22)
            {
                LandData.RegionID = UUID.Parse(Query[i]);
                LandData.GlobalID = UUID.Parse(Query[i + 1]);
                LandData.LocalID = int.Parse(Query[i + 2]);
                LandData.UserLocation = new Vector3(float.Parse(Query[i + 3]), float.Parse(Query[i + 4]), float.Parse(Query[i + 5]));
                LandData.Name = Query[i + 6];
                LandData.Description = Query[i + 7];
                LandData.Flags = uint.Parse(Query[i + 8]);
                LandData.Dwell = int.Parse(Query[i + 9]);
                LandData.InfoUUID = UUID.Parse(Query[i + 10]);
                LandData.AuctionID = uint.Parse(Query[i + 13]);
                LandData.Area = int.Parse(Query[i + 14]);
                LandData.Maturity = int.Parse(Query[i + 16]);
                LandData.OwnerID = UUID.Parse(Query[i + 17]);
                LandData.GroupID = UUID.Parse(Query[i + 18]);
                LandData.SnapshotID = UUID.Parse(Query[i + 20]);
                try
                {
                    LandData.Bitmap = OSDParser.DeserializeLLSDXml(Query[i + 21]);
                }
                catch
                {
                }

                Lands.Add(LandData);
                LandData = new LandData();
            }
            LandData = null;
            
            bool[,] tempConvertMap = new bool[r.RegionSizeX / 4, r.RegionSizeX / 4];
            tempConvertMap.Initialize();
            foreach (LandData land in Lands)
            {
                if (land.Bitmap == null)
                    continue;
                ConvertBytesToLandBitmap(ref tempConvertMap, land.Bitmap, r.RegionSizeX);
                if (tempConvertMap[X / 64, Y / 64])
                {
                    LandData = land;
                    break;
                }
            }
            if (LandData == null && Lands.Count != 0)
                LandData = Lands[0];
            return LandData;
        }
开发者ID:NickyPerian,项目名称:Aurora-Sim,代码行数:78,代码来源:LocalDirectoryServiceConnector.cs


示例15: IncomingLandObjectFromStorage

 public void IncomingLandObjectFromStorage(LandData data)
 {
     ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
     new_land.LandData = data;
     new_land.SetLandBitmapFromByteArray();
     new_land.SetInfoID();
     AddLandObject(new_land);
 }
开发者ID:KristenMynx,项目名称:Aurora-Sim,代码行数:8,代码来源:ParcelManagementModule.cs


示例16: Query2LandData

        private static List<LandData> Query2LandData(List<string> Query)
        {
            List<LandData> Lands = new List<LandData>();

            LandData LandData;

            for (int i = 0; i < Query.Count; i += 23)
            {
                LandData = new LandData();
                LandData.RegionID = UUID.Parse(Query[i]);
                LandData.GlobalID = UUID.Parse(Query[i + 1]);
                LandData.LocalID = int.Parse(Query[i + 2]);
                LandData.UserLocation = new Vector3(float.Parse(Query[i + 3]), float.Parse(Query[i + 4]),
                                                    float.Parse(Query[i + 5]));
                LandData.Name = Query[i + 6];
                LandData.Description = Query[i + 7];
                LandData.Flags = uint.Parse(Query[i + 8]);
                LandData.Dwell = int.Parse(Query[i + 9]);
                LandData.InfoUUID = UUID.Parse(Query[i + 10]);
                LandData.AuctionID = uint.Parse(Query[i + 13]);
                LandData.Area = int.Parse(Query[i + 14]);
                LandData.Maturity = int.Parse(Query[i + 16]);
                LandData.OwnerID = UUID.Parse(Query[i + 17]);
                LandData.GroupID = UUID.Parse(Query[i + 18]);
                LandData.SnapshotID = UUID.Parse(Query[i + 20]);
                try
                {
                    LandData.Bitmap = OSDParser.DeserializeLLSDXml(Query[i + 21]);
                }
                catch
                {
                }
                LandData.Category = (Query[i + 22] == string.Empty) ? ParcelCategory.None : (ParcelCategory)int.Parse(Query[i + 22]);

                Lands.Add(LandData);
            }
            return Lands;
        }
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:38,代码来源:LocalDirectoryServiceConnector.cs


示例17: LoadModuleFromArchive

            public void LoadModuleFromArchive(byte[] data, string filePath, TarArchiveReader.TarEntryType type,
                IScene scene)
            {
                if (filePath.StartsWith("parcels/"))
                {
                    if (!m_merge)
                    {
                        //Only use if we are not merging
                        LandData parcel = new LandData();
                        OSD parcelData = OSDParser.DeserializeLLSDBinary(data);
                        parcel.FromOSD((OSDMap) parcelData);
                        m_parcels.Add(parcel);
                    }
                }
                    #region New Style Terrain Loading

                else if (filePath.StartsWith("newstyleterrain/"))
                {
                    ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();
                    terrainModule.TerrainMap = ReadTerrain(data, scene);
                }
                else if (filePath.StartsWith("newstylerevertterrain/"))
                {
                    ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();
                    terrainModule.TerrainRevertMap = ReadTerrain(data, scene);
                }
                else if (filePath.StartsWith("newstylewater/"))
                {
                    ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();
                    terrainModule.TerrainWaterMap = ReadTerrain(data, scene);
                }
                else if (filePath.StartsWith("newstylerevertwater/"))
                {
                    ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();
                    terrainModule.TerrainWaterRevertMap = ReadTerrain(data, scene);
                }
                    #endregion
                    #region Old Style Terrain Loading

                else if (filePath.StartsWith("terrain/"))
                {
                    ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();

                    MemoryStream ms = new MemoryStream(data);
                    terrainModule.LoadFromStream(filePath, ms, 0, 0);
                    ms.Close();
                }
                else if (filePath.StartsWith("revertterrain/"))
                {
                    ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();

                    MemoryStream ms = new MemoryStream(data);
                    terrainModule.LoadRevertMapFromStream(filePath, ms, 0, 0);
                    ms.Close();
                }
                else if (filePath.StartsWith("water/"))
                {
                    ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();

                    MemoryStream ms = new MemoryStream(data);
                    terrainModule.LoadWaterFromStream(filePath, ms, 0, 0);
                    ms.Close();
                }
                else if (filePath.StartsWith("revertwater/"))
                {
                    ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();

                    MemoryStream ms = new MemoryStream(data);
                    terrainModule.LoadWaterRevertMapFromStream(filePath, ms, 0, 0);
                    ms.Close();
                }
                    #endregion

                else if (filePath.StartsWith("entities/"))
                {
                    MemoryStream ms = new MemoryStream(data);
                    ISceneEntity sceneObject = SceneEntitySerializer.SceneObjectSerializer.FromXml2Format(ref ms, scene);
                    ms.Close();
                    ms = null;
                    data = null;
                    m_groups.Add(sceneObject);
                }
                else if (filePath.StartsWith("assets/"))
                {
                    if (m_loadAssets)
                    {
                        AssetBase asset = new AssetBase();
                        asset.Unpack(OSDParser.DeserializeJson(Encoding.UTF8.GetString(data)));
                        scene.AssetService.Store(asset);
                    }
                }
            }
开发者ID:samiam123,项目名称:sam2Aurora,代码行数:92,代码来源:Backup.cs


示例18: UpdateLandObject

        public void UpdateLandObject(int local_id, LandData data)
        {
            LandData newData = data.Copy();
            newData.LocalID = local_id;

            lock (m_landList)
            {
                if (m_landList.ContainsKey(local_id))
                {
                    m_landList[local_id].LandData = newData;
                    AddLandObjectToSearch(data);
                    IParcelServiceConnector conn = Aurora.DataManager.DataManager.RequestPlugin<IParcelServiceConnector>();
                    if (conn != null)
                        conn.StoreLandObject(data);
                    m_scene.EventManager.TriggerLandObjectAdded(m_landList[local_id].LandData);
                }
            }
        }
开发者ID:x8ball,项目名称:Aurora-Sim,代码行数:18,代码来源:ParcelManagementModule.cs


示例19: PreprocessIncomingLandObjectFromStorage

 public bool PreprocessIncomingLandObjectFromStorage(LandData data)
 {
     ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
     new_land.LandData = data;
     new_land.SetInfoID();
     if (!new_land.SetLandBitmapFromByteArray())
         return false;
     AddLandObject(new_land, true);
     return true;
 }
开发者ID:x8ball,项目名称:Aurora-Sim,代码行数:10,代码来源:ParcelManagementModule.cs


示例20: GetParcelByOwner

        public LandData[] GetParcelByOwner(UUID OwnerID)
        {
            List<LandData> Lands = new List<LandData>();
            List<string> Query = GD.Query("OwnerID", OwnerID, "searchparcel", "*");
            if (Query.Count == 0)
                return Lands.ToArray();
            int i = 0;
            int DataCount = 0;
            LandData LandData = new LandData();
            foreach (string RetVal in Query)
            {
                if (DataCount == 0)
                    LandData.RegionID = UUID.Parse(Query[i]);
                if (DataCount == 1)
                    LandData.GlobalID = UUID.Parse(Query[i]);
                if (DataCount == 2)
                    LandData.LocalID = int.Parse(Query[i]);
                if (DataCount == 3)
                    LandData.UserLocation = Vector3.Parse(Query[i]);
                if (DataCount == 6)
                    LandData.Name = Query[i];
                if (DataCount == 7)
                    LandData.Description = Query[i];
                if (DataCount == 8)
                    LandData.Flags = uint.Parse(Query[i]);
                if (DataCount == 9)
                    LandData.Dwell = int.Parse(Query[i]);
                if (DataCount == 10)
                    LandData.InfoUUID = UUID.Parse(Query[i]);
                if (DataCount == 13)
                    LandData.AuctionID = uint.Parse(Query[i]);
                if (DataCount == 14)
                    LandData.Area = int.Parse(Query[i]);
                if (DataCount == 16)
                    LandData.Maturity = int.Parse(Query[i]);
                if (DataCount == 17)
                    LandData.OwnerID = UUID.Parse(Query[i]);
                if (DataCount == 18)
                    LandData.GroupID = UUID.Parse(Query[i]);
                if (DataCount == 20)
                    LandData.SnapshotID = UUID.Parse(Query[i]);

                DataCount++;
                i++;
                if (DataCount == 21)
                {
                    Lands.Add(LandData);
                    LandData = new LandData();
                    Dat 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# LangCode类代码示例发布时间:2022-05-24
下一篇:
C# LambdaExpression类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap