diff options
author | mingchen | 2007-06-07 00:04:50 +0000 |
---|---|---|
committer | mingchen | 2007-06-07 00:04:50 +0000 |
commit | a12a495c22817f901792fd9e11c2a4b4a5c628a8 (patch) | |
tree | 55d710d872da255036d3003b58e85efa2706be87 /OpenSim/OpenSim.RegionServer/world | |
parent | If this is what it takes, then fine (diff) | |
download | opensim-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/OpenSim.RegionServer/world')
-rw-r--r-- | OpenSim/OpenSim.RegionServer/world/ParcelManager.cs | 51 | ||||
-rw-r--r-- | OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs | 7 | ||||
-rw-r--r-- | OpenSim/OpenSim.RegionServer/world/World.cs | 3 |
3 files changed, 49 insertions, 12 deletions
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) |