diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Land')
3 files changed, 64 insertions, 65 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs index d519d4d..1e1291a 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs | |||
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using libsecondlife; | 30 | using OpenMetaverse; |
31 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
32 | using OpenSim.Region.Environment.Interfaces; | 32 | using OpenSim.Region.Environment.Interfaces; |
33 | using OpenSim.Region.Environment.Scenes; | 33 | using OpenSim.Region.Environment.Scenes; |
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
88 | { | 88 | { |
89 | return m_landManagementModule.GetLandObject(x_float, y_float); | 89 | return m_landManagementModule.GetLandObject(x_float, y_float); |
90 | } | 90 | } |
91 | ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene); | 91 | ILandObject obj = new LandObject(UUID.Zero, false, m_scene); |
92 | obj.landData.Name = "NO LAND"; | 92 | obj.landData.Name = "NO LAND"; |
93 | return obj; | 93 | return obj; |
94 | } | 94 | } |
@@ -100,12 +100,12 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
100 | { | 100 | { |
101 | return m_landManagementModule.GetLandObject(x, y); | 101 | return m_landManagementModule.GetLandObject(x, y); |
102 | } | 102 | } |
103 | ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene); | 103 | ILandObject obj = new LandObject(UUID.Zero, false, m_scene); |
104 | obj.landData.Name = "NO LAND"; | 104 | obj.landData.Name = "NO LAND"; |
105 | return obj; | 105 | return obj; |
106 | } | 106 | } |
107 | 107 | ||
108 | public List<ILandObject> ParcelsNearPoint(LLVector3 position) | 108 | public List<ILandObject> ParcelsNearPoint(Vector3 position) |
109 | { | 109 | { |
110 | if (m_landManagementModule != null) | 110 | if (m_landManagementModule != null) |
111 | { | 111 | { |
@@ -142,7 +142,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
142 | m_landManagementModule.UpdateLandObject(localID, data); | 142 | m_landManagementModule.UpdateLandObject(localID, data); |
143 | } | 143 | } |
144 | } | 144 | } |
145 | public void ReturnObjectsInParcel(int localID, uint returnType, LLUUID[] agentIDs, LLUUID[] taskIDs, IClientAPI remoteClient) | 145 | public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) |
146 | { | 146 | { |
147 | if (m_landManagementModule != null) | 147 | if (m_landManagementModule != null) |
148 | { | 148 | { |
@@ -168,4 +168,4 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
168 | #endregion | 168 | #endregion |
169 | 169 | ||
170 | } | 170 | } |
171 | } \ No newline at end of file | 171 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs index 00994fb..e5bdafc 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -29,7 +29,7 @@ using System; | |||
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using libsecondlife; | 32 | using OpenMetaverse; |
33 | using log4net; | 33 | using log4net; |
34 | using Nini.Config; | 34 | using Nini.Config; |
35 | using OpenSim.Region.Environment.Interfaces; | 35 | using OpenSim.Region.Environment.Interfaces; |
@@ -38,7 +38,6 @@ using OpenSim.Framework; | |||
38 | using OpenSim.Framework.Servers; | 38 | using OpenSim.Framework.Servers; |
39 | using OpenSim.Framework.Communications.Capabilities; | 39 | using OpenSim.Framework.Communications.Capabilities; |
40 | using OpenSim.Region.Physics.Manager; | 40 | using OpenSim.Region.Physics.Manager; |
41 | using Axiom.Math; | ||
42 | using Caps = OpenSim.Framework.Communications.Capabilities.Caps; | 41 | using Caps = OpenSim.Framework.Communications.Capabilities.Caps; |
43 | 42 | ||
44 | namespace OpenSim.Region.Environment.Modules.World.Land | 43 | namespace OpenSim.Region.Environment.Modules.World.Land |
@@ -165,10 +164,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
165 | lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1; | 164 | lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1; |
166 | landIDList.Initialize(); | 165 | landIDList.Initialize(); |
167 | 166 | ||
168 | ILandObject fullSimParcel = new LandObject(LLUUID.Zero, false, m_scene); | 167 | ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene); |
169 | 168 | ||
170 | fullSimParcel.setLandBitmap(fullSimParcel.getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); | 169 | fullSimParcel.setLandBitmap(fullSimParcel.getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); |
171 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) | 170 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) |
172 | fullSimParcel.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 171 | fullSimParcel.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
173 | else | 172 | else |
174 | fullSimParcel.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; | 173 | fullSimParcel.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; |
@@ -176,7 +175,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
176 | AddLandObject(fullSimParcel); | 175 | AddLandObject(fullSimParcel); |
177 | } | 176 | } |
178 | 177 | ||
179 | public List<ILandObject> ParcelsNearPoint(LLVector3 position) | 178 | public List<ILandObject> ParcelsNearPoint(Vector3 position) |
180 | { | 179 | { |
181 | List<ILandObject> parcelsNear = new List<ILandObject>(); | 180 | List<ILandObject> parcelsNear = new List<ILandObject>(); |
182 | for (int x = -4; x <= 4; x += 4) | 181 | for (int x = -4; x <= 4; x += 4) |
@@ -205,8 +204,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
205 | "You are not allowed on this parcel because you are banned. Please go away. <3 OpenSim Developers"); | 204 | "You are not allowed on this parcel because you are banned. Please go away. <3 OpenSim Developers"); |
206 | 205 | ||
207 | avatar.PhysicsActor.Position = | 206 | avatar.PhysicsActor.Position = |
208 | new PhysicsVector(avatar.lastKnownAllowedPosition.x, avatar.lastKnownAllowedPosition.y, | 207 | new PhysicsVector(avatar.lastKnownAllowedPosition.X, avatar.lastKnownAllowedPosition.Y, |
209 | avatar.lastKnownAllowedPosition.z); | 208 | avatar.lastKnownAllowedPosition.Z); |
210 | avatar.PhysicsActor.Velocity = new PhysicsVector(0, 0, 0); | 209 | avatar.PhysicsActor.Velocity = new PhysicsVector(0, 0, 0); |
211 | } | 210 | } |
212 | else | 211 | else |
@@ -216,7 +215,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
216 | } | 215 | } |
217 | } | 216 | } |
218 | 217 | ||
219 | public void handleAvatarChangingParcel(ScenePresence avatar, int localLandID, LLUUID regionID) | 218 | public void handleAvatarChangingParcel(ScenePresence avatar, int localLandID, UUID regionID) |
220 | { | 219 | { |
221 | if (m_scene.RegionInfo.RegionID == regionID) | 220 | if (m_scene.RegionInfo.RegionID == regionID) |
222 | { | 221 | { |
@@ -353,7 +352,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
353 | } | 352 | } |
354 | 353 | ||
355 | 354 | ||
356 | public void handleParcelAccessRequest(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, | 355 | public void handleParcelAccessRequest(UUID agentID, UUID sessionID, uint flags, int sequenceID, |
357 | int landLocalID, IClientAPI remote_client) | 356 | int landLocalID, IClientAPI remote_client) |
358 | { | 357 | { |
359 | if (landList.ContainsKey(landLocalID)) | 358 | if (landList.ContainsKey(landLocalID)) |
@@ -362,7 +361,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
362 | } | 361 | } |
363 | } | 362 | } |
364 | 363 | ||
365 | public void handleParcelAccessUpdateRequest(LLUUID agentID, LLUUID sessionID, uint flags, int landLocalID, | 364 | public void handleParcelAccessUpdateRequest(UUID agentID, UUID sessionID, uint flags, int landLocalID, |
366 | List<ParcelManager.ParcelAccessEntry> entries, | 365 | List<ParcelManager.ParcelAccessEntry> entries, |
367 | IClientAPI remote_client) | 366 | IClientAPI remote_client) |
368 | { | 367 | { |
@@ -385,7 +384,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
385 | /// <returns></returns> | 384 | /// <returns></returns> |
386 | public ILandObject CreateBaseLand() | 385 | public ILandObject CreateBaseLand() |
387 | { | 386 | { |
388 | return new LandObject(LLUUID.Zero, false, m_scene); | 387 | return new LandObject(UUID.Zero, false, m_scene); |
389 | } | 388 | } |
390 | 389 | ||
391 | /// <summary> | 390 | /// <summary> |
@@ -529,7 +528,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
529 | 528 | ||
530 | public void AddPrimToLandPrimCounts(SceneObjectGroup obj) | 529 | public void AddPrimToLandPrimCounts(SceneObjectGroup obj) |
531 | { | 530 | { |
532 | LLVector3 position = obj.AbsolutePosition; | 531 | Vector3 position = obj.AbsolutePosition; |
533 | ILandObject landUnderPrim = GetLandObject(position.X, position.Y); | 532 | ILandObject landUnderPrim = GetLandObject(position.X, position.Y); |
534 | if (landUnderPrim != null) | 533 | if (landUnderPrim != null) |
535 | { | 534 | { |
@@ -548,7 +547,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
548 | public void FinalizeLandPrimCountUpdate() | 547 | public void FinalizeLandPrimCountUpdate() |
549 | { | 548 | { |
550 | //Get Simwide prim count for owner | 549 | //Get Simwide prim count for owner |
551 | Dictionary<LLUUID, List<LandObject>> landOwnersAndParcels = new Dictionary<LLUUID, List<LandObject>>(); | 550 | Dictionary<UUID, List<LandObject>> landOwnersAndParcels = new Dictionary<UUID, List<LandObject>>(); |
552 | foreach (LandObject p in landList.Values) | 551 | foreach (LandObject p in landList.Values) |
553 | { | 552 | { |
554 | if (!landOwnersAndParcels.ContainsKey(p.landData.OwnerID)) | 553 | if (!landOwnersAndParcels.ContainsKey(p.landData.OwnerID)) |
@@ -563,7 +562,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
563 | } | 562 | } |
564 | } | 563 | } |
565 | 564 | ||
566 | foreach (LLUUID owner in landOwnersAndParcels.Keys) | 565 | foreach (UUID owner in landOwnersAndParcels.Keys) |
567 | { | 566 | { |
568 | int simArea = 0; | 567 | int simArea = 0; |
569 | int simPrims = 0; | 568 | int simPrims = 0; |
@@ -617,9 +616,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
617 | /// <param name="start_y">South Point</param> | 616 | /// <param name="start_y">South Point</param> |
618 | /// <param name="end_x">East Point</param> | 617 | /// <param name="end_x">East Point</param> |
619 | /// <param name="end_y">North Point</param> | 618 | /// <param name="end_y">North Point</param> |
620 | /// <param name="attempting_user_id">LLUUID of user who is trying to subdivide</param> | 619 | /// <param name="attempting_user_id">UUID of user who is trying to subdivide</param> |
621 | /// <returns>Returns true if successful</returns> | 620 | /// <returns>Returns true if successful</returns> |
622 | private void subdivide(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id) | 621 | private void subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) |
623 | { | 622 | { |
624 | //First, lets loop through the points and make sure they are all in the same peice of land | 623 | //First, lets loop through the points and make sure they are all in the same peice of land |
625 | //Get the land object at start | 624 | //Get the land object at start |
@@ -658,7 +657,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
658 | //Lets create a new land object with bitmap activated at that point (keeping the old land objects info) | 657 | //Lets create a new land object with bitmap activated at that point (keeping the old land objects info) |
659 | ILandObject newLand = startLandObject.Copy(); | 658 | ILandObject newLand = startLandObject.Copy(); |
660 | newLand.landData.Name = "Subdivision of " + newLand.landData.Name; | 659 | newLand.landData.Name = "Subdivision of " + newLand.landData.Name; |
661 | newLand.landData.GlobalID = LLUUID.Random(); | 660 | newLand.landData.GlobalID = UUID.Random(); |
662 | 661 | ||
663 | newLand.setLandBitmap(newLand.getSquareLandBitmap(start_x, start_y, end_x, end_y)); | 662 | newLand.setLandBitmap(newLand.getSquareLandBitmap(start_x, start_y, end_x, end_y)); |
664 | 663 | ||
@@ -683,9 +682,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
683 | /// <param name="start_y">y value in first piece of land</param> | 682 | /// <param name="start_y">y value in first piece of land</param> |
684 | /// <param name="end_x">x value in second peice of land</param> | 683 | /// <param name="end_x">x value in second peice of land</param> |
685 | /// <param name="end_y">y value in second peice of land</param> | 684 | /// <param name="end_y">y value in second peice of land</param> |
686 | /// <param name="attempting_user_id">LLUUID of the avatar trying to join the land objects</param> | 685 | /// <param name="attempting_user_id">UUID of the avatar trying to join the land objects</param> |
687 | /// <returns>Returns true if successful</returns> | 686 | /// <returns>Returns true if successful</returns> |
688 | private void join(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id) | 687 | private void join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) |
689 | { | 688 | { |
690 | end_x -= 4; | 689 | end_x -= 4; |
691 | end_y -= 4; | 690 | end_y -= 4; |
@@ -770,13 +769,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
770 | tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_REQUESTER); | 769 | tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_REQUESTER); |
771 | } | 770 | } |
772 | else if (currentParcelBlock.landData.SalePrice > 0 && | 771 | else if (currentParcelBlock.landData.SalePrice > 0 && |
773 | (currentParcelBlock.landData.AuthBuyerID == LLUUID.Zero || | 772 | (currentParcelBlock.landData.AuthBuyerID == UUID.Zero || |
774 | currentParcelBlock.landData.AuthBuyerID == remote_client.AgentId)) | 773 | currentParcelBlock.landData.AuthBuyerID == remote_client.AgentId)) |
775 | { | 774 | { |
776 | //Sale Flag | 775 | //Sale Flag |
777 | tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_IS_FOR_SALE); | 776 | tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_IS_FOR_SALE); |
778 | } | 777 | } |
779 | else if (currentParcelBlock.landData.OwnerID == LLUUID.Zero) | 778 | else if (currentParcelBlock.landData.OwnerID == UUID.Zero) |
780 | { | 779 | { |
781 | //Public Flag | 780 | //Public Flag |
782 | tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_PUBLIC); | 781 | tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_PUBLIC); |
@@ -914,7 +913,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
914 | { | 913 | { |
915 | if (m_scene.ExternalChecks.ExternalChecksCanAbandonParcel(remote_client.AgentId, landList[local_id])) | 914 | if (m_scene.ExternalChecks.ExternalChecksCanAbandonParcel(remote_client.AgentId, landList[local_id])) |
916 | { | 915 | { |
917 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) | 916 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) |
918 | landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 917 | landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
919 | else | 918 | else |
920 | landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; | 919 | landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; |
@@ -930,7 +929,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
930 | { | 929 | { |
931 | if (m_scene.ExternalChecks.ExternalChecksCanReclaimParcel(remote_client.AgentId, landList[local_id])) | 930 | if (m_scene.ExternalChecks.ExternalChecksCanReclaimParcel(remote_client.AgentId, landList[local_id])) |
932 | { | 931 | { |
933 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) | 932 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) |
934 | landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 933 | landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
935 | else | 934 | else |
936 | landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; | 935 | landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; |
@@ -979,13 +978,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
979 | } | 978 | } |
980 | if (lob != null) | 979 | if (lob != null) |
981 | { | 980 | { |
982 | LLUUID AuthorizedID = lob.landData.AuthBuyerID; | 981 | UUID AuthorizedID = lob.landData.AuthBuyerID; |
983 | int saleprice = lob.landData.SalePrice; | 982 | int saleprice = lob.landData.SalePrice; |
984 | LLUUID pOwnerID = lob.landData.OwnerID; | 983 | UUID pOwnerID = lob.landData.OwnerID; |
985 | 984 | ||
986 | bool landforsale = ((lob.landData.Flags & | 985 | bool landforsale = ((lob.landData.Flags & |
987 | (uint)(Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects)) != 0); | 986 | (uint)(Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects)) != 0); |
988 | if ((AuthorizedID == LLUUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale) | 987 | if ((AuthorizedID == UUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale) |
989 | { | 988 | { |
990 | lock (e) | 989 | lock (e) |
991 | { | 990 | { |
@@ -1027,7 +1026,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
1027 | AddLandObject(new_land); | 1026 | AddLandObject(new_land); |
1028 | } | 1027 | } |
1029 | 1028 | ||
1030 | public void ReturnObjectsInParcel(int localID, uint returnType, LLUUID[] agentIDs, LLUUID[] taskIDs, IClientAPI remoteClient) | 1029 | public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) |
1031 | { | 1030 | { |
1032 | ILandObject selectedParcel = null; | 1031 | ILandObject selectedParcel = null; |
1033 | lock (landList) | 1032 | lock (landList) |
@@ -1065,7 +1064,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
1065 | 1064 | ||
1066 | #region CAPS handler | 1065 | #region CAPS handler |
1067 | 1066 | ||
1068 | private void OnRegisterCaps(LLUUID agentID, Caps caps) | 1067 | private void OnRegisterCaps(UUID agentID, Caps caps) |
1069 | { | 1068 | { |
1070 | string capsBase = "/CAPS/" + caps.CapsObjectPath; | 1069 | string capsBase = "/CAPS/" + caps.CapsObjectPath; |
1071 | caps.RegisterHandler("RemoteParcelRequest", | 1070 | caps.RegisterHandler("RemoteParcelRequest", |
@@ -1080,7 +1079,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
1080 | // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the | 1079 | // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the |
1081 | // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. | 1080 | // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. |
1082 | // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x | 1081 | // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x |
1083 | // and y coordinate (each 8 bit), encoded in a LLUUID (128 bit). | 1082 | // and y coordinate (each 8 bit), encoded in a UUID (128 bit). |
1084 | // | 1083 | // |
1085 | // Request format: | 1084 | // Request format: |
1086 | // <llsd> | 1085 | // <llsd> |
@@ -1095,16 +1094,16 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
1095 | // <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid> | 1094 | // <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid> |
1096 | // </map> | 1095 | // </map> |
1097 | // </llsd> | 1096 | // </llsd> |
1098 | private string RemoteParcelRequest(string request, string path, string param, LLUUID agentID, Caps caps) | 1097 | private string RemoteParcelRequest(string request, string path, string param, UUID agentID, Caps caps) |
1099 | { | 1098 | { |
1100 | LLUUID parcelID = LLUUID.Zero; | 1099 | UUID parcelID = UUID.Zero; |
1101 | try | 1100 | try |
1102 | { | 1101 | { |
1103 | Hashtable hash = new Hashtable(); | 1102 | Hashtable hash = new Hashtable(); |
1104 | hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); | 1103 | hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request)); |
1105 | if (hash.ContainsKey("region_id") && hash.ContainsKey("location")) | 1104 | if (hash.ContainsKey("region_id") && hash.ContainsKey("location")) |
1106 | { | 1105 | { |
1107 | LLUUID regionID = (LLUUID)hash["region_id"]; | 1106 | UUID regionID = (UUID)hash["region_id"]; |
1108 | ArrayList list = (ArrayList)hash["location"]; | 1107 | ArrayList list = (ArrayList)hash["location"]; |
1109 | uint x = (uint)(double)list[0]; | 1108 | uint x = (uint)(double)list[0]; |
1110 | uint y = (uint)(double)list[1]; | 1109 | uint y = (uint)(double)list[1]; |
@@ -1148,9 +1147,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
1148 | 1147 | ||
1149 | #endregion | 1148 | #endregion |
1150 | 1149 | ||
1151 | private void handleParcelInfo(IClientAPI remoteClient, LLUUID parcelID) | 1150 | private void handleParcelInfo(IClientAPI remoteClient, UUID parcelID) |
1152 | { | 1151 | { |
1153 | if (parcelID == LLUUID.Zero) | 1152 | if (parcelID == UUID.Zero) |
1154 | return; | 1153 | return; |
1155 | 1154 | ||
1156 | // assume we've got the parcelID we just computed in RemoteParcelRequest | 1155 | // assume we've got the parcelID we just computed in RemoteParcelRequest |
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index 6388a1c..640b665 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using libsecondlife; | 31 | using OpenMetaverse; |
32 | using log4net; | 32 | using log4net; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Region.Environment.Interfaces; | 34 | using OpenSim.Region.Environment.Interfaces; |
@@ -67,14 +67,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
67 | set { m_landData = value; } | 67 | set { m_landData = value; } |
68 | } | 68 | } |
69 | 69 | ||
70 | public LLUUID regionUUID | 70 | public UUID regionUUID |
71 | { | 71 | { |
72 | get { return m_scene.RegionInfo.RegionID; } | 72 | get { return m_scene.RegionInfo.RegionID; } |
73 | } | 73 | } |
74 | 74 | ||
75 | #region Constructors | 75 | #region Constructors |
76 | 76 | ||
77 | public LandObject(LLUUID owner_id, bool is_group_owned, Scene scene) | 77 | public LandObject(UUID owner_id, bool is_group_owned, Scene scene) |
78 | { | 78 | { |
79 | m_scene = scene; | 79 | m_scene = scene; |
80 | landData.OwnerID = owner_id; | 80 | landData.OwnerID = owner_id; |
@@ -216,7 +216,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
216 | } | 216 | } |
217 | } | 217 | } |
218 | 218 | ||
219 | public void updateLandSold(LLUUID avatarID, LLUUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) | 219 | public void updateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) |
220 | { | 220 | { |
221 | LandData newData = landData.Copy(); | 221 | LandData newData = landData.Copy(); |
222 | newData.OwnerID = avatarID; | 222 | newData.OwnerID = avatarID; |
@@ -226,14 +226,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
226 | newData.ClaimDate = Util.UnixTimeSinceEpoch(); | 226 | newData.ClaimDate = Util.UnixTimeSinceEpoch(); |
227 | newData.ClaimPrice = claimprice; | 227 | newData.ClaimPrice = claimprice; |
228 | newData.SalePrice = 0; | 228 | newData.SalePrice = 0; |
229 | newData.AuthBuyerID = LLUUID.Zero; | 229 | newData.AuthBuyerID = UUID.Zero; |
230 | newData.Flags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects); | 230 | newData.Flags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects); |
231 | m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); | 231 | m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); |
232 | 232 | ||
233 | sendLandUpdateToAvatarsOverMe(); | 233 | sendLandUpdateToAvatarsOverMe(); |
234 | } | 234 | } |
235 | 235 | ||
236 | public bool isEitherBannedOrRestricted(LLUUID avatar) | 236 | public bool isEitherBannedOrRestricted(UUID avatar) |
237 | { | 237 | { |
238 | if (isBannedFromLand(avatar)) | 238 | if (isBannedFromLand(avatar)) |
239 | { | 239 | { |
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
246 | return false; | 246 | return false; |
247 | } | 247 | } |
248 | 248 | ||
249 | public bool isBannedFromLand(LLUUID avatar) | 249 | public bool isBannedFromLand(UUID avatar) |
250 | { | 250 | { |
251 | if ((landData.Flags & (uint) Parcel.ParcelFlags.UseBanList) > 0) | 251 | if ((landData.Flags & (uint) Parcel.ParcelFlags.UseBanList) > 0) |
252 | { | 252 | { |
@@ -263,7 +263,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
263 | return false; | 263 | return false; |
264 | } | 264 | } |
265 | 265 | ||
266 | public bool isRestrictedFromLand(LLUUID avatar) | 266 | public bool isRestrictedFromLand(UUID avatar) |
267 | { | 267 | { |
268 | if ((landData.Flags & (uint) Parcel.ParcelFlags.UseAccessList) > 0) | 268 | if ((landData.Flags & (uint) Parcel.ParcelFlags.UseAccessList) > 0) |
269 | { | 269 | { |
@@ -322,9 +322,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
322 | 322 | ||
323 | #region AccessList Functions | 323 | #region AccessList Functions |
324 | 324 | ||
325 | public List<LLUUID> createAccessListArrayByFlag(ParcelManager.AccessList flag) | 325 | public List<UUID> createAccessListArrayByFlag(ParcelManager.AccessList flag) |
326 | { | 326 | { |
327 | List<LLUUID> list = new List<LLUUID>(); | 327 | List<UUID> list = new List<UUID>(); |
328 | foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList) | 328 | foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList) |
329 | { | 329 | { |
330 | if (entry.Flags == flag) | 330 | if (entry.Flags == flag) |
@@ -334,25 +334,25 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
334 | } | 334 | } |
335 | if (list.Count == 0) | 335 | if (list.Count == 0) |
336 | { | 336 | { |
337 | list.Add(LLUUID.Zero); | 337 | list.Add(UUID.Zero); |
338 | } | 338 | } |
339 | 339 | ||
340 | return list; | 340 | return list; |
341 | } | 341 | } |
342 | 342 | ||
343 | public void sendAccessList(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, | 343 | public void sendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, |
344 | IClientAPI remote_client) | 344 | IClientAPI remote_client) |
345 | { | 345 | { |
346 | 346 | ||
347 | if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both) | 347 | if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both) |
348 | { | 348 | { |
349 | List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access); | 349 | List<UUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access); |
350 | remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.LocalID); | 350 | remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.LocalID); |
351 | } | 351 | } |
352 | 352 | ||
353 | if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both) | 353 | if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both) |
354 | { | 354 | { |
355 | List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban); | 355 | List<UUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban); |
356 | remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.LocalID); | 356 | remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.LocalID); |
357 | } | 357 | } |
358 | } | 358 | } |
@@ -361,7 +361,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
361 | { | 361 | { |
362 | LandData newData = landData.Copy(); | 362 | LandData newData = landData.Copy(); |
363 | 363 | ||
364 | if (entries.Count == 1 && entries[0].AgentID == LLUUID.Zero) | 364 | if (entries.Count == 1 && entries[0].AgentID == UUID.Zero) |
365 | { | 365 | { |
366 | entries.Clear(); | 366 | entries.Clear(); |
367 | } | 367 | } |
@@ -450,7 +450,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
450 | if (ty > 255) | 450 | if (ty > 255) |
451 | ty = 255; | 451 | ty = 255; |
452 | landData.AABBMin = | 452 | landData.AABBMin = |
453 | new LLVector3((float) (min_x * 4), (float) (min_y * 4), | 453 | new Vector3((float) (min_x * 4), (float) (min_y * 4), |
454 | (float) m_scene.Heightmap[tx, ty]); | 454 | (float) m_scene.Heightmap[tx, ty]); |
455 | 455 | ||
456 | tx = max_x * 4; | 456 | tx = max_x * 4; |
@@ -460,7 +460,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
460 | if (ty > 255) | 460 | if (ty > 255) |
461 | ty = 255; | 461 | ty = 255; |
462 | landData.AABBMax = | 462 | landData.AABBMax = |
463 | new LLVector3((float) (max_x * 4), (float) (max_y * 4), | 463 | new Vector3((float) (max_x * 4), (float) (max_y * 4), |
464 | (float) m_scene.Heightmap[tx, ty]); | 464 | (float) m_scene.Heightmap[tx, ty]); |
465 | landData.Area = tempArea; | 465 | landData.Area = tempArea; |
466 | } | 466 | } |
@@ -694,7 +694,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
694 | { | 694 | { |
695 | if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId, this)) | 695 | if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId, this)) |
696 | { | 696 | { |
697 | Dictionary<LLUUID, int> primCount = new Dictionary<LLUUID, int>(); | 697 | Dictionary<UUID, int> primCount = new Dictionary<UUID, int>(); |
698 | 698 | ||
699 | lock (primsOverMe) | 699 | lock (primsOverMe) |
700 | { | 700 | { |
@@ -734,9 +734,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
734 | } | 734 | } |
735 | } | 735 | } |
736 | 736 | ||
737 | public Dictionary<LLUUID, int> getLandObjectOwners() | 737 | public Dictionary<UUID, int> getLandObjectOwners() |
738 | { | 738 | { |
739 | Dictionary<LLUUID, int> ownersAndCount = new Dictionary<LLUUID, int>(); | 739 | Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>(); |
740 | lock (primsOverMe) | 740 | lock (primsOverMe) |
741 | { | 741 | { |
742 | try | 742 | try |
@@ -771,7 +771,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
771 | m_scene.returnObjects(objs, obj.OwnerID); | 771 | m_scene.returnObjects(objs, obj.OwnerID); |
772 | } | 772 | } |
773 | 773 | ||
774 | public void returnLandObjects(uint type, LLUUID[] owners, IClientAPI remote_client) | 774 | public void returnLandObjects(uint type, UUID[] owners, IClientAPI remote_client) |
775 | { | 775 | { |
776 | List<SceneObjectGroup> objlist = new List<SceneObjectGroup>(); | 776 | List<SceneObjectGroup> objlist = new List<SceneObjectGroup>(); |
777 | for (int i = 0; i < owners.Length; i++) | 777 | for (int i = 0; i < owners.Length; i++) |
@@ -814,7 +814,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
814 | public void addPrimToCount(SceneObjectGroup obj) | 814 | public void addPrimToCount(SceneObjectGroup obj) |
815 | { | 815 | { |
816 | 816 | ||
817 | LLUUID prim_owner = obj.OwnerID; | 817 | UUID prim_owner = obj.OwnerID; |
818 | int prim_count = obj.PrimCount; | 818 | int prim_count = obj.PrimCount; |
819 | 819 | ||
820 | if (obj.IsSelected) | 820 | if (obj.IsSelected) |
@@ -843,7 +843,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
843 | { | 843 | { |
844 | if (primsOverMe.Contains(obj)) | 844 | if (primsOverMe.Contains(obj)) |
845 | { | 845 | { |
846 | LLUUID prim_owner = obj.OwnerID; | 846 | UUID prim_owner = obj.OwnerID; |
847 | int prim_count = obj.PrimCount; | 847 | int prim_count = obj.PrimCount; |
848 | 848 | ||
849 | if (prim_owner == landData.OwnerID) | 849 | if (prim_owner == landData.OwnerID) |