aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authormingchen2007-06-07 00:04:50 +0000
committermingchen2007-06-07 00:04:50 +0000
commita12a495c22817f901792fd9e11c2a4b4a5c628a8 (patch)
tree55d710d872da255036d3003b58e85efa2706be87 /OpenSim
parentIf this is what it takes, then fine (diff)
downloadopensim-SC_OLD-a12a495c22817f901792fd9e11c2a4b4a5c628a8.zip
opensim-SC_OLD-a12a495c22817f901792fd9e11c2a4b4a5c628a8.tar.gz
opensim-SC_OLD-a12a495c22817f901792fd9e11c2a4b4a5c628a8.tar.bz2
opensim-SC_OLD-a12a495c22817f901792fd9e11c2a4b4a5c628a8.tar.xz
*Added support to change most of a parcel's settings and flags (from the about land box)
*Added the rest of the member variables relating to parcels in the ParcelData class
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs6
-rw-r--r--OpenSim/OpenSim.RegionServer/world/ParcelManager.cs51
-rw-r--r--OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs7
-rw-r--r--OpenSim/OpenSim.RegionServer/world/World.cs3
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs12
5 files changed, 66 insertions, 13 deletions
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
index e329f09..e3d875f 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
@@ -83,9 +83,11 @@ namespace OpenSim
83 public event UpdatePrimRotation OnUpdatePrimRotation; 83 public event UpdatePrimRotation OnUpdatePrimRotation;
84 public event UpdatePrimVector OnUpdatePrimScale; 84 public event UpdatePrimVector OnUpdatePrimScale;
85 public event StatusChange OnChildAgentStatus; 85 public event StatusChange OnChildAgentStatus;
86
86 public event ParcelPropertiesRequest OnParcelPropertiesRequest; 87 public event ParcelPropertiesRequest OnParcelPropertiesRequest;
87 public event ParcelDivideRequest OnParcelDivideRequest; 88 public event ParcelDivideRequest OnParcelDivideRequest;
88 public event ParcelJoinRequest OnParcelJoinRequest; 89 public event ParcelJoinRequest OnParcelJoinRequest;
90 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
89 91
90 protected override void ProcessInPacket(Packet Pack) 92 protected override void ProcessInPacket(Packet Pack)
91 { 93 {
@@ -482,6 +484,10 @@ namespace OpenSim
482 ParcelJoinPacket parcelJoin = (ParcelJoinPacket)Pack; 484 ParcelJoinPacket parcelJoin = (ParcelJoinPacket)Pack;
483 OnParcelJoinRequest((int)Math.Round(parcelJoin.ParcelData.West), (int)Math.Round(parcelJoin.ParcelData.South), (int)Math.Round(parcelJoin.ParcelData.East), (int)Math.Round(parcelJoin.ParcelData.North), this); 485 OnParcelJoinRequest((int)Math.Round(parcelJoin.ParcelData.West), (int)Math.Round(parcelJoin.ParcelData.South), (int)Math.Round(parcelJoin.ParcelData.East), (int)Math.Round(parcelJoin.ParcelData.North), this);
484 break; 486 break;
487 case PacketType.ParcelPropertiesUpdate:
488 ParcelPropertiesUpdatePacket updatePacket = (ParcelPropertiesUpdatePacket)Pack;
489 OnParcelPropertiesUpdateRequest(updatePacket, this);
490 break;
485 #endregion 491 #endregion
486 492
487 #region unimplemented handlers 493 #region unimplemented handlers
diff --git a/OpenSim/OpenSim.RegionServer/world/ParcelManager.cs b/OpenSim/OpenSim.RegionServer/world/ParcelManager.cs
index c3de54e..fe977bc 100644
--- a/OpenSim/OpenSim.RegionServer/world/ParcelManager.cs
+++ b/OpenSim/OpenSim.RegionServer/world/ParcelManager.cs
@@ -39,6 +39,7 @@ namespace OpenSim.RegionServer.world
39 public delegate void ParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, ClientView remote_client); 39 public delegate void ParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, ClientView remote_client);
40 public delegate void ParcelDivideRequest(int west, int south, int east, int north, ClientView remote_client); 40 public delegate void ParcelDivideRequest(int west, int south, int east, int north, ClientView remote_client);
41 public delegate void ParcelJoinRequest(int west, int south, int east, int north, ClientView remote_client); 41 public delegate void ParcelJoinRequest(int west, int south, int east, int north, ClientView remote_client);
42 public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, ClientView remote_client);
42 43
43 #region ParcelManager Class 44 #region ParcelManager Class
44 /// <summary> 45 /// <summary>
@@ -526,13 +527,13 @@ namespace OpenSim.RegionServer.world
526 updatePacket.ParcelData.GroupID = parcelData.groupID; 527 updatePacket.ParcelData.GroupID = parcelData.groupID;
527 updatePacket.ParcelData.GroupPrims = parcelData.groupPrims; 528 updatePacket.ParcelData.GroupPrims = parcelData.groupPrims;
528 updatePacket.ParcelData.IsGroupOwned = parcelData.isGroupOwned; 529 updatePacket.ParcelData.IsGroupOwned = parcelData.isGroupOwned;
529 updatePacket.ParcelData.LandingType = (byte)0; //unemplemented 530 updatePacket.ParcelData.LandingType = (byte)parcelData.landingType;
530 updatePacket.ParcelData.LocalID = parcelData.localID; 531 updatePacket.ParcelData.LocalID = parcelData.localID;
531 updatePacket.ParcelData.MaxPrims = 1000; //unemplemented 532 updatePacket.ParcelData.MaxPrims = 1000; //unemplemented
532 updatePacket.ParcelData.MediaAutoScale = (byte)0; //unemplemented 533 updatePacket.ParcelData.MediaAutoScale = parcelData.mediaAutoScale;
533 updatePacket.ParcelData.MediaID = LLUUID.Zero; //unemplemented 534 updatePacket.ParcelData.MediaID = parcelData.mediaID;
534 updatePacket.ParcelData.MediaURL = Helpers.StringToField(""); //unemplemented 535 updatePacket.ParcelData.MediaURL = Helpers.StringToField(parcelData.mediaURL);
535 updatePacket.ParcelData.MusicURL = Helpers.StringToField(""); //unemplemented 536 updatePacket.ParcelData.MusicURL = Helpers.StringToField(parcelData.musicURL);
536 updatePacket.ParcelData.Name = Helpers.StringToField(parcelData.parcelName); 537 updatePacket.ParcelData.Name = Helpers.StringToField(parcelData.parcelName);
537 updatePacket.ParcelData.OtherCleanTime = 0; //unemplemented 538 updatePacket.ParcelData.OtherCleanTime = 0; //unemplemented
538 updatePacket.ParcelData.OtherCount = 0; //unemplemented 539 updatePacket.ParcelData.OtherCount = 0; //unemplemented
@@ -541,8 +542,8 @@ namespace OpenSim.RegionServer.world
541 updatePacket.ParcelData.OwnerPrims = 0; //unemplemented 542 updatePacket.ParcelData.OwnerPrims = 0; //unemplemented
542 updatePacket.ParcelData.ParcelFlags = (uint)parcelData.parcelFlags; //unemplemented 543 updatePacket.ParcelData.ParcelFlags = (uint)parcelData.parcelFlags; //unemplemented
543 updatePacket.ParcelData.ParcelPrimBonus = (float)1.0; //unemplemented 544 updatePacket.ParcelData.ParcelPrimBonus = (float)1.0; //unemplemented
544 updatePacket.ParcelData.PassHours = (float)0.0; //unemplemented 545 updatePacket.ParcelData.PassHours = parcelData.passHours;
545 updatePacket.ParcelData.PassPrice = 0; //unemeplemented 546 updatePacket.ParcelData.PassPrice = parcelData.passPrice;
546 updatePacket.ParcelData.PublicCount = 0; //unemplemented 547 updatePacket.ParcelData.PublicCount = 0; //unemplemented
547 updatePacket.ParcelData.RegionDenyAnonymous = false; //unemplemented 548 updatePacket.ParcelData.RegionDenyAnonymous = false; //unemplemented
548 updatePacket.ParcelData.RegionDenyIdentified = false; //unemplemented 549 updatePacket.ParcelData.RegionDenyIdentified = false; //unemplemented
@@ -556,15 +557,41 @@ namespace OpenSim.RegionServer.world
556 updatePacket.ParcelData.SequenceID = sequence_id; 557 updatePacket.ParcelData.SequenceID = sequence_id;
557 updatePacket.ParcelData.SimWideMaxPrims = 15000; //unemplemented 558 updatePacket.ParcelData.SimWideMaxPrims = 15000; //unemplemented
558 updatePacket.ParcelData.SimWideTotalPrims = 0; //unemplemented 559 updatePacket.ParcelData.SimWideTotalPrims = 0; //unemplemented
559 updatePacket.ParcelData.SnapSelection = snap_selection; //Bleh - not important yet 560 updatePacket.ParcelData.SnapSelection = snap_selection;
560 updatePacket.ParcelData.SnapshotID = LLUUID.Zero; //Unemplemented 561 updatePacket.ParcelData.SnapshotID = parcelData.snapshotID;
561 updatePacket.ParcelData.Status = (byte)parcelData.parcelStatus; //?? 562 updatePacket.ParcelData.Status = (byte)parcelData.parcelStatus;
562 updatePacket.ParcelData.TotalPrims = 0; //unemplemented 563 updatePacket.ParcelData.TotalPrims = 0; //unemplemented
563 updatePacket.ParcelData.UserLocation = LLVector3.Zero; //unemplemented 564 updatePacket.ParcelData.UserLocation = parcelData.userLocation;
564 updatePacket.ParcelData.UserLookAt = LLVector3.Zero; //unemeplemented 565 updatePacket.ParcelData.UserLookAt = parcelData.userLookAt;
565 566
566 remote_client.OutPacket((Packet)updatePacket); 567 remote_client.OutPacket((Packet)updatePacket);
567 } 568 }
569
570 public void updateParcelProperties(ParcelPropertiesUpdatePacket packet, ClientView remote_client)
571 {
572 if (remote_client.AgentID == parcelData.ownerID)
573 {
574 //Needs later group support
575 Console.WriteLine("Request for update - parcel #" + parcelData.localID);
576 parcelData.authBuyerID = packet.ParcelData.AuthBuyerID;
577 parcelData.category = (libsecondlife.Parcel.ParcelCategory)packet.ParcelData.Category;
578 parcelData.parcelDesc = Helpers.FieldToUTF8String(packet.ParcelData.Desc);
579 parcelData.groupID = packet.ParcelData.GroupID;
580 parcelData.landingType = packet.ParcelData.LandingType;
581 parcelData.mediaAutoScale = packet.ParcelData.MediaAutoScale;
582 parcelData.mediaID = packet.ParcelData.MediaID;
583 parcelData.mediaURL = Helpers.FieldToUTF8String(packet.ParcelData.MediaURL);
584 parcelData.musicURL = Helpers.FieldToUTF8String(packet.ParcelData.MusicURL);
585 parcelData.parcelName = libsecondlife.Helpers.FieldToUTF8String(packet.ParcelData.Name);
586 parcelData.parcelFlags = (libsecondlife.Parcel.ParcelFlags)packet.ParcelData.ParcelFlags;
587 parcelData.passHours = packet.ParcelData.PassHours;
588 parcelData.passPrice = packet.ParcelData.PassPrice;
589 parcelData.salePrice = packet.ParcelData.SalePrice;
590 parcelData.snapshotID = packet.ParcelData.SnapshotID;
591 parcelData.userLocation = packet.ParcelData.UserLocation;
592 parcelData.userLookAt = packet.ParcelData.UserLookAt;
593 }
594 }
568 #endregion 595 #endregion
569 596
570 597
diff --git a/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs b/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs
index 8513e30..d2abec2 100644
--- a/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs
+++ b/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs
@@ -365,6 +365,13 @@ namespace OpenSim.world
365 { 365 {
366 parcelManager.join(west, south, east, north, remote_client.AgentID); 366 parcelManager.join(west, south, east, north, remote_client.AgentID);
367 } 367 }
368 void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, ClientView remote_client)
369 {
370 if (parcelManager.parcelList.ContainsKey(packet.ParcelData.LocalID))
371 {
372 parcelManager.parcelList[packet.ParcelData.LocalID].updateParcelProperties(packet, remote_client);
373 }
374 }
368 #endregion 375 #endregion
369 376
370 /* 377 /*
diff --git a/OpenSim/OpenSim.RegionServer/world/World.cs b/OpenSim/OpenSim.RegionServer/world/World.cs
index 8b26ecd..69f3fda 100644
--- a/OpenSim/OpenSim.RegionServer/world/World.cs
+++ b/OpenSim/OpenSim.RegionServer/world/World.cs
@@ -618,6 +618,7 @@ namespace OpenSim.world
618 agentClient.OnParcelPropertiesRequest += new OpenSim.RegionServer.world.ParcelPropertiesRequest(ParcelPropertiesRequest); 618 agentClient.OnParcelPropertiesRequest += new OpenSim.RegionServer.world.ParcelPropertiesRequest(ParcelPropertiesRequest);
619 agentClient.OnParcelDivideRequest += new OpenSim.RegionServer.world.ParcelDivideRequest(ParcelDivideRequest); 619 agentClient.OnParcelDivideRequest += new OpenSim.RegionServer.world.ParcelDivideRequest(ParcelDivideRequest);
620 agentClient.OnParcelJoinRequest+=new OpenSim.RegionServer.world.ParcelJoinRequest(ParcelJoinRequest); 620 agentClient.OnParcelJoinRequest+=new OpenSim.RegionServer.world.ParcelJoinRequest(ParcelJoinRequest);
621 agentClient.OnParcelPropertiesUpdateRequest += new OpenSim.RegionServer.world.ParcelPropertiesUpdateRequest(ParcelPropertiesUpdateRequest);
621 Avatar newAvatar = null; 622 Avatar newAvatar = null;
622 try 623 try
623 { 624 {
@@ -667,6 +668,8 @@ namespace OpenSim.world
667 668
668 669
669 670
671
672
670 673
671 674
672 public override void RemoveViewerAgent(ClientView agentClient) 675 public override void RemoveViewerAgent(ClientView agentClient)
diff --git a/OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
index d7b9f38..46fecd0 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
+++ b/OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
@@ -179,15 +179,25 @@ namespace OpenSim.Storage.LocalStorageDb4o
179 updateParcel.groupID = parcel.groupID; 179 updateParcel.groupID = parcel.groupID;
180 updateParcel.groupPrims = parcel.groupPrims; 180 updateParcel.groupPrims = parcel.groupPrims;
181 updateParcel.isGroupOwned = parcel.isGroupOwned; 181 updateParcel.isGroupOwned = parcel.isGroupOwned;
182 updateParcel.landingType = parcel.landingType;
183 updateParcel.mediaAutoScale = parcel.mediaAutoScale;
184 updateParcel.mediaID = parcel.mediaID;
185 updateParcel.mediaURL = parcel.mediaURL;
186 updateParcel.musicURL = parcel.musicURL;
182 updateParcel.localID = parcel.localID; 187 updateParcel.localID = parcel.localID;
183 updateParcel.ownerID = parcel.ownerID; 188 updateParcel.ownerID = parcel.ownerID;
189 updateParcel.passHours = parcel.passHours;
190 updateParcel.passPrice = parcel.passPrice;
184 updateParcel.parcelBitmapByteArray = (byte[])parcel.parcelBitmapByteArray.Clone(); 191 updateParcel.parcelBitmapByteArray = (byte[])parcel.parcelBitmapByteArray.Clone();
185 updateParcel.parcelDesc = parcel.parcelDesc; 192 updateParcel.parcelDesc = parcel.parcelDesc;
186 updateParcel.parcelFlags = parcel.parcelFlags; 193 updateParcel.parcelFlags = parcel.parcelFlags;
187 updateParcel.parcelName = parcel.parcelName; 194 updateParcel.parcelName = parcel.parcelName;
188 updateParcel.parcelStatus = parcel.parcelStatus; 195 updateParcel.parcelStatus = parcel.parcelStatus;
189 updateParcel.salePrice = parcel.salePrice; 196 updateParcel.salePrice = parcel.salePrice;
190 197 updateParcel.snapshotID = parcel.snapshotID;
198 updateParcel.userLocation = parcel.userLocation;
199 updateParcel.userLookAt = parcel.userLookAt;
200
191 db.Set(updateParcel); 201 db.Set(updateParcel);
192 } 202 }
193 else 203 else