Copy() public method

Make a new copy of the land data
public Copy ( ) : LandData
return LandData
Ejemplo n.º 1
0
 public LandObject(LandData landData, Scene scene)
 {
     LandData = landData.Copy();
     m_scene = scene;
 }
Ejemplo n.º 2
0
 public void IncomingLandObjectFromStorage(LandData data)
 {
     ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
     new_land.LandData = data.Copy();
     new_land.SetLandBitmapFromByteArray();            
     AddLandObject(new_land);
 }
Ejemplo n.º 3
0
        public void UpdateLandObject(int local_id, LandData data)
        {
            LandData newData = data.Copy();
            newData.LocalID = local_id;

            ILandObject land;
            lock (m_landList)
            {
                if (m_landList.TryGetValue(local_id, out land))
                    land.LandData = newData;
            }

            if (land != null)
                m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, land);
        }
Ejemplo n.º 4
0
        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;
                    m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, m_landList[local_id]);
                }
            }
        }
        private void IncomingLandObjectFromStorage(LandData data)
        {
            ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
            new_land.LandData = data.Copy();

            new_land.SetLandBitmapFromByteArray();            
            AddLandObject(new_land);
//            new_land.SendLandUpdateToAvatarsOverMe();
        }
Ejemplo n.º 6
0
        public void UpdateLandObject(int local_id, LandData data)
        {
            LandData newData = data.Copy();
            newData.LocalID = local_id;

            ILandObject dirtyObject = null;
            lock (m_landList)
            {
                m_log.InfoFormat("[LAND]: Updating parcel {0} price={1} and flags={2:X8}", local_id, newData.SalePrice, newData.Flags);
                if (m_landList.ContainsKey(local_id))
                {
                    m_landList[local_id].landData = newData;
                    dirtyObject = m_landList[local_id];
                }
                else
                    m_log.ErrorFormat("[LAND]: UpdateLandObject: Parcel [{0}] not found.", local_id);
            }

            if (dirtyObject != null)
            {
                m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, dirtyObject);
            }
        }
Ejemplo n.º 7
0
 public void IncomingLandObjectFromStorage(LandData data)
 {
     ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
     new_land.landData = data.Copy();
     new_land.setLandBitmapFromByteArray();
     new_land.landData.UpdateForcedAutoReturn(m_scene.RegionInfo.MaxAutoReturn);
     AddLandObject(new_land);
 }
        public void UpdateLandObject(int local_id, LandData data)
        {
            LandData newData = data.Copy();
            newData.LocalID = local_id;

            ILandObject land;
            m_landListRwLock.AcquireReaderLock(-1);
            try
            {
                if (m_landList.TryGetValue(local_id, out land))
                    land.LandData = newData;
            }
            finally
            {
                m_landListRwLock.ReleaseReaderLock();
            }

            if (land != null)
                m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, land);
        }