diff options
author | mingchen | 2007-07-16 19:40:25 +0000 |
---|---|---|
committer | mingchen | 2007-07-16 19:40:25 +0000 |
commit | 2873b82b788244852fd1dad3a747f3ba33a73be5 (patch) | |
tree | 1a447a3e880743860a7fb4e4f726fedf816bf9d6 | |
parent | *Renamed ParcelManager to LandManager (diff) | |
download | opensim-SC-2873b82b788244852fd1dad3a747f3ba33a73be5.zip opensim-SC-2873b82b788244852fd1dad3a747f3ba33a73be5.tar.gz opensim-SC-2873b82b788244852fd1dad3a747f3ba33a73be5.tar.bz2 opensim-SC-2873b82b788244852fd1dad3a747f3ba33a73be5.tar.xz |
*Renamed everything Parcels and ParcelData to Land and LandData
*Added missing files (I hope)
16 files changed, 274 insertions, 873 deletions
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs index 0606e43..d58496c 100644 --- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs +++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs | |||
@@ -71,7 +71,7 @@ namespace OpenSim.Framework.Interfaces | |||
71 | public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client); | 71 | public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client); |
72 | public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client); | 72 | public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client); |
73 | public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client); | 73 | public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client); |
74 | public delegate void ParcelSelectObjects(int parcel_local_id, int request_type, IClientAPI remote_client); | 74 | public delegate void ParcelSelectObjects(int land_local_id, int request_type, IClientAPI remote_client); |
75 | public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client); | 75 | public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client); |
76 | public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client); | 76 | public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client); |
77 | 77 | ||
diff --git a/OpenSim/Framework/General/Interfaces/ILocalStorage.cs b/OpenSim/Framework/General/Interfaces/ILocalStorage.cs index c7c0b5f..9d5bb62 100644 --- a/OpenSim/Framework/General/Interfaces/ILocalStorage.cs +++ b/OpenSim/Framework/General/Interfaces/ILocalStorage.cs | |||
@@ -48,11 +48,11 @@ namespace OpenSim.Framework.Interfaces | |||
48 | [System.Obsolete("Use DataStorage instead")] | 48 | [System.Obsolete("Use DataStorage instead")] |
49 | void SaveMap(float[] heightmap); | 49 | void SaveMap(float[] heightmap); |
50 | 50 | ||
51 | void SaveParcels(ParcelData[] parcels); | 51 | void SaveLandObjects(LandData[] lands); |
52 | void SaveParcel(ParcelData parcel); | 52 | void SaveLandObject(LandData land); |
53 | void RemoveParcel(ParcelData parcel); | 53 | void RemoveLandObject(LandData land); |
54 | void RemoveAllParcels(); | 54 | void RemoveAllLandObjects(); |
55 | void LoadParcels(ILocalStorageParcelReceiver recv); | 55 | void LoadLandObjects(ILocalStorageLandObjectReceiver recv); |
56 | 56 | ||
57 | void ShutDown(); | 57 | void ShutDown(); |
58 | } | 58 | } |
@@ -62,10 +62,10 @@ namespace OpenSim.Framework.Interfaces | |||
62 | void PrimFromStorage(PrimData prim); | 62 | void PrimFromStorage(PrimData prim); |
63 | } | 63 | } |
64 | 64 | ||
65 | public interface ILocalStorageParcelReceiver | 65 | public interface ILocalStorageLandObjectReceiver |
66 | { | 66 | { |
67 | void ParcelFromStorage(ParcelData data); | 67 | void LandFromStorage(LandData data); |
68 | void NoParcelDataFromStorage(); | 68 | void NoLandDataFromStorage(); |
69 | } | 69 | } |
70 | } | 70 | } |
71 | 71 | ||
diff --git a/OpenSim/Framework/General/Types/ParcelData.cs b/OpenSim/Framework/General/Types/LandData.cs index 5626299..2ae4927 100644 --- a/OpenSim/Framework/General/Types/ParcelData.cs +++ b/OpenSim/Framework/General/Types/LandData.cs | |||
@@ -1,120 +1,120 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.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 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Framework.Types | 30 | namespace OpenSim.Framework.Types |
31 | { | 31 | { |
32 | 32 | ||
33 | public class ParcelData | 33 | public class LandData |
34 | { | 34 | { |
35 | public byte[] parcelBitmapByteArray = new byte[512]; | 35 | public byte[] landBitmapByteArray = new byte[512]; |
36 | public string parcelName = "Your Parcel"; | 36 | public string landName = "Your Parcel"; |
37 | public string parcelDesc = ""; | 37 | public string landDesc = ""; |
38 | public LLUUID ownerID = new LLUUID(); | 38 | public LLUUID ownerID = new LLUUID(); |
39 | public bool isGroupOwned = false; | 39 | public bool isGroupOwned = false; |
40 | public LLVector3 AABBMin = new LLVector3(); | 40 | public LLVector3 AABBMin = new LLVector3(); |
41 | public LLVector3 AABBMax = new LLVector3(); | 41 | public LLVector3 AABBMax = new LLVector3(); |
42 | public int area = 0; | 42 | public int area = 0; |
43 | public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned | 43 | public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned |
44 | public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID | 44 | public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID |
45 | public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category | 45 | public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category |
46 | public int claimDate = 0; //Unemplemented | 46 | public int claimDate = 0; //Unemplemented |
47 | public int claimPrice = 0; //Unemplemented | 47 | public int claimPrice = 0; //Unemplemented |
48 | public LLUUID groupID = new LLUUID(); //Unemplemented | 48 | public LLUUID groupID = new LLUUID(); //Unemplemented |
49 | public int groupPrims = 0; | 49 | public int groupPrims = 0; |
50 | public int otherPrims = 0; | 50 | public int otherPrims = 0; |
51 | public int ownerPrims = 0; | 51 | public int ownerPrims = 0; |
52 | public int selectedPrims = 0; | 52 | public int selectedPrims = 0; |
53 | public int simwidePrims = 0; | 53 | public int simwidePrims = 0; |
54 | public int simwideArea = 0; | 54 | public int simwideArea = 0; |
55 | public int salePrice = 0; //Unemeplemented. Parcels price. | 55 | public int salePrice = 0; //Unemeplemented. Parcels price. |
56 | public Parcel.ParcelStatus parcelStatus = Parcel.ParcelStatus.Leased; | 56 | public Parcel.ParcelStatus landStatus = Parcel.ParcelStatus.Leased; |
57 | public uint parcelFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts; | 57 | public uint landFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts; |
58 | public byte landingType = 0; | 58 | public byte landingType = 0; |
59 | public byte mediaAutoScale = 0; | 59 | public byte mediaAutoScale = 0; |
60 | public LLUUID mediaID = LLUUID.Zero; | 60 | public LLUUID mediaID = LLUUID.Zero; |
61 | public int localID = 0; | 61 | public int localID = 0; |
62 | public LLUUID globalID = new LLUUID(); | 62 | public LLUUID globalID = new LLUUID(); |
63 | 63 | ||
64 | public string mediaURL = ""; | 64 | public string mediaURL = ""; |
65 | public string musicURL = ""; | 65 | public string musicURL = ""; |
66 | public float passHours = 0; | 66 | public float passHours = 0; |
67 | public int passPrice = 0; | 67 | public int passPrice = 0; |
68 | public LLUUID snapshotID = LLUUID.Zero; | 68 | public LLUUID snapshotID = LLUUID.Zero; |
69 | public LLVector3 userLocation = new LLVector3(); | 69 | public LLVector3 userLocation = new LLVector3(); |
70 | public LLVector3 userLookAt = new LLVector3(); | 70 | public LLVector3 userLookAt = new LLVector3(); |
71 | 71 | ||
72 | public ParcelData() | 72 | public LandData() |
73 | { | 73 | { |
74 | globalID = LLUUID.Random(); | 74 | globalID = LLUUID.Random(); |
75 | } | 75 | } |
76 | 76 | ||
77 | public ParcelData Copy() | 77 | public LandData Copy() |
78 | { | 78 | { |
79 | ParcelData parcelData = new ParcelData(); | 79 | LandData landData = new LandData(); |
80 | 80 | ||
81 | parcelData.AABBMax = this.AABBMax; | 81 | landData.AABBMax = this.AABBMax; |
82 | parcelData.AABBMin = this.AABBMin; | 82 | landData.AABBMin = this.AABBMin; |
83 | parcelData.area = this.area; | 83 | landData.area = this.area; |
84 | parcelData.auctionID = this.auctionID; | 84 | landData.auctionID = this.auctionID; |
85 | parcelData.authBuyerID = this.authBuyerID; | 85 | landData.authBuyerID = this.authBuyerID; |
86 | parcelData.category = this.category; | 86 | landData.category = this.category; |
87 | parcelData.claimDate = this.claimDate; | 87 | landData.claimDate = this.claimDate; |
88 | parcelData.claimPrice = this.claimPrice; | 88 | landData.claimPrice = this.claimPrice; |
89 | parcelData.globalID = this.globalID; | 89 | landData.globalID = this.globalID; |
90 | parcelData.groupID = this.groupID; | 90 | landData.groupID = this.groupID; |
91 | parcelData.groupPrims = this.groupPrims; | 91 | landData.groupPrims = this.groupPrims; |
92 | parcelData.otherPrims = this.otherPrims; | 92 | landData.otherPrims = this.otherPrims; |
93 | parcelData.ownerPrims = this.ownerPrims; | 93 | landData.ownerPrims = this.ownerPrims; |
94 | parcelData.selectedPrims = this.selectedPrims; | 94 | landData.selectedPrims = this.selectedPrims; |
95 | parcelData.isGroupOwned = this.isGroupOwned; | 95 | landData.isGroupOwned = this.isGroupOwned; |
96 | parcelData.localID = this.localID; | 96 | landData.localID = this.localID; |
97 | parcelData.landingType = this.landingType; | 97 | landData.landingType = this.landingType; |
98 | parcelData.mediaAutoScale = this.mediaAutoScale; | 98 | landData.mediaAutoScale = this.mediaAutoScale; |
99 | parcelData.mediaID = this.mediaID; | 99 | landData.mediaID = this.mediaID; |
100 | parcelData.mediaURL = this.mediaURL; | 100 | landData.mediaURL = this.mediaURL; |
101 | parcelData.musicURL = this.musicURL; | 101 | landData.musicURL = this.musicURL; |
102 | parcelData.ownerID = this.ownerID; | 102 | landData.ownerID = this.ownerID; |
103 | parcelData.parcelBitmapByteArray = (byte[])this.parcelBitmapByteArray.Clone(); | 103 | landData.landBitmapByteArray = (byte[])this.landBitmapByteArray.Clone(); |
104 | parcelData.parcelDesc = this.parcelDesc; | 104 | landData.landDesc = this.landDesc; |
105 | parcelData.parcelFlags = this.parcelFlags; | 105 | landData.landFlags = this.landFlags; |
106 | parcelData.parcelName = this.parcelName; | 106 | landData.landName = this.landName; |
107 | parcelData.parcelStatus = this.parcelStatus; | 107 | landData.landStatus = this.landStatus; |
108 | parcelData.passHours = this.passHours; | 108 | landData.passHours = this.passHours; |
109 | parcelData.passPrice = this.passPrice; | 109 | landData.passPrice = this.passPrice; |
110 | parcelData.salePrice = this.salePrice; | 110 | landData.salePrice = this.salePrice; |
111 | parcelData.snapshotID = this.snapshotID; | 111 | landData.snapshotID = this.snapshotID; |
112 | parcelData.userLocation = this.userLocation; | 112 | landData.userLocation = this.userLocation; |
113 | parcelData.userLookAt = this.userLookAt; | 113 | landData.userLookAt = this.userLookAt; |
114 | 114 | ||
115 | return parcelData; | 115 | return landData; |
116 | 116 | ||
117 | } | 117 | } |
118 | } | 118 | } |
119 | 119 | ||
120 | } | 120 | } |
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 4e10955..368af12 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -240,13 +240,13 @@ namespace OpenSim | |||
240 | { | 240 | { |
241 | m_log.Notice("Parcels - Found master avatar [" + masterAvatar.UUID.ToStringHyphenated() + "]"); | 241 | m_log.Notice("Parcels - Found master avatar [" + masterAvatar.UUID.ToStringHyphenated() + "]"); |
242 | scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; | 242 | scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; |
243 | scene.localStorage.LoadParcels((ILocalStorageParcelReceiver)scene.LandManager); | 243 | scene.localStorage.LoadLandObjects((ILocalStorageLandObjectReceiver)scene.LandManager); |
244 | } | 244 | } |
245 | else | 245 | else |
246 | { | 246 | { |
247 | m_log.Notice("Parcels - No master avatar found, using null."); | 247 | m_log.Notice("Parcels - No master avatar found, using null."); |
248 | scene.RegionInfo.MasterAvatarAssignedUUID = libsecondlife.LLUUID.Zero; | 248 | scene.RegionInfo.MasterAvatarAssignedUUID = libsecondlife.LLUUID.Zero; |
249 | scene.localStorage.LoadParcels((ILocalStorageParcelReceiver)scene.LandManager); | 249 | scene.localStorage.LoadLandObjects((ILocalStorageLandObjectReceiver)scene.LandManager); |
250 | } | 250 | } |
251 | scene.performParcelPrimCountUpdate(); | 251 | scene.performParcelPrimCountUpdate(); |
252 | scene.StartTimer(); | 252 | scene.StartTimer(); |
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index 1f9110c..dd0a6c8 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | |||
@@ -583,17 +583,17 @@ namespace OpenSim.Region.ClientStack | |||
583 | } | 583 | } |
584 | break; | 584 | break; |
585 | case PacketType.ParcelDivide: | 585 | case PacketType.ParcelDivide: |
586 | ParcelDividePacket parcelDivide = (ParcelDividePacket)Pack; | 586 | ParcelDividePacket landDivide = (ParcelDividePacket)Pack; |
587 | if (OnParcelDivideRequest != null) | 587 | if (OnParcelDivideRequest != null) |
588 | { | 588 | { |
589 | OnParcelDivideRequest((int)Math.Round(parcelDivide.ParcelData.West), (int)Math.Round(parcelDivide.ParcelData.South), (int)Math.Round(parcelDivide.ParcelData.East), (int)Math.Round(parcelDivide.ParcelData.North), this); | 589 | OnParcelDivideRequest((int)Math.Round(landDivide.ParcelData.West), (int)Math.Round(landDivide.ParcelData.South), (int)Math.Round(landDivide.ParcelData.East), (int)Math.Round(landDivide.ParcelData.North), this); |
590 | } | 590 | } |
591 | break; | 591 | break; |
592 | case PacketType.ParcelJoin: | 592 | case PacketType.ParcelJoin: |
593 | ParcelJoinPacket parcelJoin = (ParcelJoinPacket)Pack; | 593 | ParcelJoinPacket landJoin = (ParcelJoinPacket)Pack; |
594 | if (OnParcelJoinRequest != null) | 594 | if (OnParcelJoinRequest != null) |
595 | { | 595 | { |
596 | 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); | 596 | OnParcelJoinRequest((int)Math.Round(landJoin.ParcelData.West), (int)Math.Round(landJoin.ParcelData.South), (int)Math.Round(landJoin.ParcelData.East), (int)Math.Round(landJoin.ParcelData.North), this); |
597 | } | 597 | } |
598 | break; | 598 | break; |
599 | case PacketType.ParcelPropertiesUpdate: | 599 | case PacketType.ParcelPropertiesUpdate: |
diff --git a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs index 05e936e..4148d08 100644 --- a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs +++ b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs | |||
@@ -32,7 +32,7 @@ using OpenSim.Framework.Types; | |||
32 | using OpenSim.Region; | 32 | using OpenSim.Region; |
33 | using OpenSim.Region.Environment; | 33 | using OpenSim.Region.Environment; |
34 | using OpenSim.Region.Environment.Scenes; | 34 | using OpenSim.Region.Environment.Scenes; |
35 | using OpenSim.Region.Environment.Parcels; | 35 | using OpenSim.Region.Environment.LandManagement; |
36 | 36 | ||
37 | using System.Collections.Generic; | 37 | using System.Collections.Generic; |
38 | 38 | ||
@@ -55,9 +55,9 @@ namespace OpenSim.Region.Interfaces | |||
55 | void StoreTerrain(double[,] terrain); | 55 | void StoreTerrain(double[,] terrain); |
56 | double[,] LoadTerrain(); | 56 | double[,] LoadTerrain(); |
57 | 57 | ||
58 | void StoreParcel(Environment.Parcels.Parcel Parcel); | 58 | void StoreParcel(Land Parcel); |
59 | void RemoveParcel(uint ID); | 59 | void RemoveLandObject(uint ID); |
60 | List<Environment.Parcels.Parcel> LoadParcels(); | 60 | List<Land> LoadLandObjects(); |
61 | 61 | ||
62 | void Shutdown(); | 62 | void Shutdown(); |
63 | } | 63 | } |
diff --git a/OpenSim/Region/Environment/Parcels/Parcel.cs b/OpenSim/Region/Environment/Parcels/Parcel.cs deleted file mode 100644 index 99e9591..0000000 --- a/OpenSim/Region/Environment/Parcels/Parcel.cs +++ /dev/null | |||
@@ -1,599 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using libsecondlife; | ||
4 | using libsecondlife.Packets; | ||
5 | using OpenSim.Framework.Interfaces; | ||
6 | using OpenSim.Framework.Types; | ||
7 | using OpenSim.Region.Environment.Scenes; | ||
8 | |||
9 | namespace OpenSim.Region.Environment.Parcels | ||
10 | { | ||
11 | #region Parcel Class | ||
12 | /// <summary> | ||
13 | /// Keeps track of a specific parcel's information | ||
14 | /// </summary> | ||
15 | public class Parcel | ||
16 | { | ||
17 | #region Member Variables | ||
18 | public ParcelData parcelData = new ParcelData(); | ||
19 | public List<SceneObject> primsOverMe = new List<SceneObject>(); | ||
20 | |||
21 | public Scene m_world; | ||
22 | |||
23 | private bool[,] parcelBitmap = new bool[64, 64]; | ||
24 | |||
25 | #endregion | ||
26 | |||
27 | |||
28 | #region Constructors | ||
29 | public Parcel(LLUUID owner_id, bool is_group_owned, Scene world) | ||
30 | { | ||
31 | m_world = world; | ||
32 | parcelData.ownerID = owner_id; | ||
33 | parcelData.isGroupOwned = is_group_owned; | ||
34 | |||
35 | } | ||
36 | #endregion | ||
37 | |||
38 | |||
39 | #region Member Functions | ||
40 | |||
41 | #region General Functions | ||
42 | /// <summary> | ||
43 | /// Checks to see if this parcel contains a point | ||
44 | /// </summary> | ||
45 | /// <param name="x"></param> | ||
46 | /// <param name="y"></param> | ||
47 | /// <returns>Returns true if the parcel contains the specified point</returns> | ||
48 | public bool containsPoint(int x, int y) | ||
49 | { | ||
50 | if (x >= 0 && y >= 0 && x <= 256 && x <= 256) | ||
51 | { | ||
52 | return (parcelBitmap[x / 4, y / 4] == true); | ||
53 | } | ||
54 | else | ||
55 | { | ||
56 | return false; | ||
57 | } | ||
58 | } | ||
59 | |||
60 | public Parcel Copy() | ||
61 | { | ||
62 | Parcel newParcel = new Parcel(this.parcelData.ownerID, this.parcelData.isGroupOwned, m_world); | ||
63 | |||
64 | //Place all new variables here! | ||
65 | newParcel.parcelBitmap = (bool[,])(this.parcelBitmap.Clone()); | ||
66 | newParcel.parcelData = parcelData.Copy(); | ||
67 | |||
68 | return newParcel; | ||
69 | } | ||
70 | |||
71 | #endregion | ||
72 | |||
73 | |||
74 | #region Packet Request Handling | ||
75 | /// <summary> | ||
76 | /// Sends parcel properties as requested | ||
77 | /// </summary> | ||
78 | /// <param name="sequence_id">ID sent by client for them to keep track of</param> | ||
79 | /// <param name="snap_selection">Bool sent by client for them to use</param> | ||
80 | /// <param name="remote_client">Object representing the client</param> | ||
81 | public void sendParcelProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client) | ||
82 | { | ||
83 | |||
84 | ParcelPropertiesPacket updatePacket = new ParcelPropertiesPacket(); | ||
85 | updatePacket.ParcelData.AABBMax = parcelData.AABBMax; | ||
86 | updatePacket.ParcelData.AABBMin = parcelData.AABBMin; | ||
87 | updatePacket.ParcelData.Area = parcelData.area; | ||
88 | updatePacket.ParcelData.AuctionID = parcelData.auctionID; | ||
89 | updatePacket.ParcelData.AuthBuyerID = parcelData.authBuyerID; //unemplemented | ||
90 | |||
91 | updatePacket.ParcelData.Bitmap = parcelData.parcelBitmapByteArray; | ||
92 | |||
93 | updatePacket.ParcelData.Desc = Helpers.StringToField(parcelData.parcelDesc); | ||
94 | updatePacket.ParcelData.Category = (byte)parcelData.category; | ||
95 | updatePacket.ParcelData.ClaimDate = parcelData.claimDate; | ||
96 | updatePacket.ParcelData.ClaimPrice = parcelData.claimPrice; | ||
97 | updatePacket.ParcelData.GroupID = parcelData.groupID; | ||
98 | updatePacket.ParcelData.GroupPrims = parcelData.groupPrims; | ||
99 | updatePacket.ParcelData.IsGroupOwned = parcelData.isGroupOwned; | ||
100 | updatePacket.ParcelData.LandingType = (byte)parcelData.landingType; | ||
101 | updatePacket.ParcelData.LocalID = parcelData.localID; | ||
102 | if (parcelData.area > 0) | ||
103 | { | ||
104 | updatePacket.ParcelData.MaxPrims = Convert.ToInt32(Math.Round((Convert.ToDecimal(parcelData.area) / Convert.ToDecimal(65536)) * 15000 * Convert.ToDecimal(m_world.RegionInfo.estateSettings.objectBonusFactor))); | ||
105 | } | ||
106 | else | ||
107 | { | ||
108 | updatePacket.ParcelData.MaxPrims = 0; | ||
109 | } | ||
110 | updatePacket.ParcelData.MediaAutoScale = parcelData.mediaAutoScale; | ||
111 | updatePacket.ParcelData.MediaID = parcelData.mediaID; | ||
112 | updatePacket.ParcelData.MediaURL = Helpers.StringToField(parcelData.mediaURL); | ||
113 | updatePacket.ParcelData.MusicURL = Helpers.StringToField(parcelData.musicURL); | ||
114 | updatePacket.ParcelData.Name = Helpers.StringToField(parcelData.parcelName); | ||
115 | updatePacket.ParcelData.OtherCleanTime = 0; //unemplemented | ||
116 | updatePacket.ParcelData.OtherCount = 0; //unemplemented | ||
117 | updatePacket.ParcelData.OtherPrims = parcelData.otherPrims; | ||
118 | updatePacket.ParcelData.OwnerID = parcelData.ownerID; | ||
119 | updatePacket.ParcelData.OwnerPrims = parcelData.ownerPrims; | ||
120 | updatePacket.ParcelData.ParcelFlags = parcelData.parcelFlags; | ||
121 | updatePacket.ParcelData.ParcelPrimBonus = m_world.RegionInfo.estateSettings.objectBonusFactor; | ||
122 | updatePacket.ParcelData.PassHours = parcelData.passHours; | ||
123 | updatePacket.ParcelData.PassPrice = parcelData.passPrice; | ||
124 | updatePacket.ParcelData.PublicCount = 0; //unemplemented | ||
125 | updatePacket.ParcelData.RegionDenyAnonymous = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyAnonymous) > 0); | ||
126 | updatePacket.ParcelData.RegionDenyIdentified = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyIdentified) > 0); | ||
127 | updatePacket.ParcelData.RegionDenyTransacted = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyTransacted) > 0); | ||
128 | updatePacket.ParcelData.RegionPushOverride = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.RestrictPushObject) > 0); | ||
129 | updatePacket.ParcelData.RentPrice = 0; | ||
130 | updatePacket.ParcelData.RequestResult = request_result; | ||
131 | updatePacket.ParcelData.SalePrice = parcelData.salePrice; | ||
132 | updatePacket.ParcelData.SelectedPrims = parcelData.selectedPrims; | ||
133 | updatePacket.ParcelData.SelfCount = 0;//unemplemented | ||
134 | updatePacket.ParcelData.SequenceID = sequence_id; | ||
135 | if (parcelData.simwideArea > 0) | ||
136 | { | ||
137 | updatePacket.ParcelData.SimWideMaxPrims = Convert.ToInt32(Math.Round((Convert.ToDecimal(parcelData.simwideArea) / Convert.ToDecimal(65536)) * 15000 * Convert.ToDecimal(m_world.RegionInfo.estateSettings.objectBonusFactor))); | ||
138 | } | ||
139 | else | ||
140 | { | ||
141 | updatePacket.ParcelData.SimWideMaxPrims = 0; | ||
142 | } | ||
143 | updatePacket.ParcelData.SimWideTotalPrims = parcelData.simwidePrims; | ||
144 | updatePacket.ParcelData.SnapSelection = snap_selection; | ||
145 | updatePacket.ParcelData.SnapshotID = parcelData.snapshotID; | ||
146 | updatePacket.ParcelData.Status = (byte)parcelData.parcelStatus; | ||
147 | updatePacket.ParcelData.TotalPrims = parcelData.ownerPrims + parcelData.groupPrims + parcelData.otherPrims + parcelData.selectedPrims; | ||
148 | updatePacket.ParcelData.UserLocation = parcelData.userLocation; | ||
149 | updatePacket.ParcelData.UserLookAt = parcelData.userLookAt; | ||
150 | remote_client.OutPacket((Packet)updatePacket); | ||
151 | } | ||
152 | |||
153 | public void updateParcelProperties(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client) | ||
154 | { | ||
155 | if (remote_client.AgentId == parcelData.ownerID) | ||
156 | { | ||
157 | //Needs later group support | ||
158 | parcelData.authBuyerID = packet.ParcelData.AuthBuyerID; | ||
159 | parcelData.category = (libsecondlife.Parcel.ParcelCategory)packet.ParcelData.Category; | ||
160 | parcelData.parcelDesc = Helpers.FieldToUTF8String(packet.ParcelData.Desc); | ||
161 | parcelData.groupID = packet.ParcelData.GroupID; | ||
162 | parcelData.landingType = packet.ParcelData.LandingType; | ||
163 | parcelData.mediaAutoScale = packet.ParcelData.MediaAutoScale; | ||
164 | parcelData.mediaID = packet.ParcelData.MediaID; | ||
165 | parcelData.mediaURL = Helpers.FieldToUTF8String(packet.ParcelData.MediaURL); | ||
166 | parcelData.musicURL = Helpers.FieldToUTF8String(packet.ParcelData.MusicURL); | ||
167 | parcelData.parcelName = Helpers.FieldToUTF8String(packet.ParcelData.Name); | ||
168 | parcelData.parcelFlags = packet.ParcelData.ParcelFlags; | ||
169 | parcelData.passHours = packet.ParcelData.PassHours; | ||
170 | parcelData.passPrice = packet.ParcelData.PassPrice; | ||
171 | parcelData.salePrice = packet.ParcelData.SalePrice; | ||
172 | parcelData.snapshotID = packet.ParcelData.SnapshotID; | ||
173 | parcelData.userLocation = packet.ParcelData.UserLocation; | ||
174 | parcelData.userLookAt = packet.ParcelData.UserLookAt; | ||
175 | sendParcelUpdateToAvatarsOverMe(); | ||
176 | |||
177 | |||
178 | } | ||
179 | } | ||
180 | |||
181 | public void sendParcelUpdateToAvatarsOverMe() | ||
182 | { | ||
183 | List<ScenePresence> avatars = m_world.RequestAvatarList(); | ||
184 | for (int i = 0; i < avatars.Count; i++) | ||
185 | { | ||
186 | Parcel over = m_world.LandManager.getParcel((int)Math.Round(avatars[i].Pos.X), (int)Math.Round(avatars[i].Pos.Y)); | ||
187 | if (over.parcelData.localID == this.parcelData.localID) | ||
188 | { | ||
189 | sendParcelProperties(0, false, 0, avatars[i].ControllingClient); | ||
190 | } | ||
191 | } | ||
192 | } | ||
193 | #endregion | ||
194 | |||
195 | |||
196 | #region Update Functions | ||
197 | /// <summary> | ||
198 | /// Updates the AABBMin and AABBMax values after area/shape modification of parcel | ||
199 | /// </summary> | ||
200 | private void updateAABBAndAreaValues() | ||
201 | { | ||
202 | int min_x = 64; | ||
203 | int min_y = 64; | ||
204 | int max_x = 0; | ||
205 | int max_y = 0; | ||
206 | int tempArea = 0; | ||
207 | int x, y; | ||
208 | for (x = 0; x < 64; x++) | ||
209 | { | ||
210 | for (y = 0; y < 64; y++) | ||
211 | { | ||
212 | if (parcelBitmap[x, y] == true) | ||
213 | { | ||
214 | if (min_x > x) min_x = x; | ||
215 | if (min_y > y) min_y = y; | ||
216 | if (max_x < x) max_x = x; | ||
217 | if (max_y < y) max_y = y; | ||
218 | tempArea += 16; //16sqm parcel | ||
219 | } | ||
220 | } | ||
221 | } | ||
222 | parcelData.AABBMin = new LLVector3((float)(min_x * 4), (float)(min_y * 4), (float)m_world.Terrain.get((min_x * 4), (min_y * 4))); | ||
223 | parcelData.AABBMax = new LLVector3((float)(max_x * 4), (float)(max_y * 4), (float)m_world.Terrain.get((max_x * 4), (max_y * 4))); | ||
224 | parcelData.area = tempArea; | ||
225 | } | ||
226 | |||
227 | public void updateParcelBitmapByteArray() | ||
228 | { | ||
229 | parcelData.parcelBitmapByteArray = convertParcelBitmapToBytes(); | ||
230 | } | ||
231 | |||
232 | /// <summary> | ||
233 | /// Update all settings in parcel such as area, bitmap byte array, etc | ||
234 | /// </summary> | ||
235 | public void forceUpdateParcelInfo() | ||
236 | { | ||
237 | this.updateAABBAndAreaValues(); | ||
238 | this.updateParcelBitmapByteArray(); | ||
239 | } | ||
240 | |||
241 | public void setParcelBitmapFromByteArray() | ||
242 | { | ||
243 | parcelBitmap = convertBytesToParcelBitmap(); | ||
244 | } | ||
245 | #endregion | ||
246 | |||
247 | |||
248 | #region Parcel Bitmap Functions | ||
249 | /// <summary> | ||
250 | /// Sets the parcel's bitmap manually | ||
251 | /// </summary> | ||
252 | /// <param name="bitmap">64x64 block representing where this parcel is on a map</param> | ||
253 | public void setParcelBitmap(bool[,] bitmap) | ||
254 | { | ||
255 | if (bitmap.GetLength(0) != 64 || bitmap.GetLength(1) != 64 || bitmap.Rank != 2) | ||
256 | { | ||
257 | //Throw an exception - The bitmap is not 64x64 | ||
258 | throw new Exception("Error: Invalid Parcel Bitmap"); | ||
259 | } | ||
260 | else | ||
261 | { | ||
262 | //Valid: Lets set it | ||
263 | parcelBitmap = bitmap; | ||
264 | forceUpdateParcelInfo(); | ||
265 | |||
266 | } | ||
267 | } | ||
268 | /// <summary> | ||
269 | /// Gets the parcels bitmap manually | ||
270 | /// </summary> | ||
271 | /// <returns></returns> | ||
272 | public bool[,] getParcelBitmap() | ||
273 | { | ||
274 | return parcelBitmap; | ||
275 | } | ||
276 | /// <summary> | ||
277 | /// Converts the parcel bitmap to a packet friendly byte array | ||
278 | /// </summary> | ||
279 | /// <returns></returns> | ||
280 | private byte[] convertParcelBitmapToBytes() | ||
281 | { | ||
282 | byte[] tempConvertArr = new byte[512]; | ||
283 | byte tempByte = 0; | ||
284 | int x, y, i, byteNum = 0; | ||
285 | i = 0; | ||
286 | for (y = 0; y < 64; y++) | ||
287 | { | ||
288 | for (x = 0; x < 64; x++) | ||
289 | { | ||
290 | tempByte = Convert.ToByte(tempByte | Convert.ToByte(parcelBitmap[x, y]) << (i++ % 8)); | ||
291 | if (i % 8 == 0) | ||
292 | { | ||
293 | tempConvertArr[byteNum] = tempByte; | ||
294 | tempByte = (byte)0; | ||
295 | i = 0; | ||
296 | byteNum++; | ||
297 | } | ||
298 | } | ||
299 | } | ||
300 | return tempConvertArr; | ||
301 | } | ||
302 | |||
303 | private bool[,] convertBytesToParcelBitmap() | ||
304 | { | ||
305 | bool[,] tempConvertMap = new bool[64, 64]; | ||
306 | tempConvertMap.Initialize(); | ||
307 | byte tempByte = 0; | ||
308 | int x = 0, y = 0, i = 0, bitNum = 0; | ||
309 | for (i = 0; i < 512; i++) | ||
310 | { | ||
311 | tempByte = parcelData.parcelBitmapByteArray[i]; | ||
312 | for (bitNum = 0; bitNum < 8; bitNum++) | ||
313 | { | ||
314 | bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte)1); | ||
315 | tempConvertMap[x, y] = bit; | ||
316 | x++; | ||
317 | if (x > 63) | ||
318 | { | ||
319 | x = 0; | ||
320 | y++; | ||
321 | } | ||
322 | |||
323 | } | ||
324 | |||
325 | } | ||
326 | return tempConvertMap; | ||
327 | } | ||
328 | /// <summary> | ||
329 | /// Full sim parcel creation | ||
330 | /// </summary> | ||
331 | /// <returns></returns> | ||
332 | public static bool[,] basicFullRegionParcelBitmap() | ||
333 | { | ||
334 | return getSquareParcelBitmap(0, 0, 256, 256); | ||
335 | } | ||
336 | |||
337 | /// <summary> | ||
338 | /// Used to modify the bitmap between the x and y points. Points use 64 scale | ||
339 | /// </summary> | ||
340 | /// <param name="start_x"></param> | ||
341 | /// <param name="start_y"></param> | ||
342 | /// <param name="end_x"></param> | ||
343 | /// <param name="end_y"></param> | ||
344 | /// <returns></returns> | ||
345 | public static bool[,] getSquareParcelBitmap(int start_x, int start_y, int end_x, int end_y) | ||
346 | { | ||
347 | |||
348 | bool[,] tempBitmap = new bool[64, 64]; | ||
349 | tempBitmap.Initialize(); | ||
350 | |||
351 | tempBitmap = modifyParcelBitmapSquare(tempBitmap, start_x, start_y, end_x, end_y, true); | ||
352 | return tempBitmap; | ||
353 | } | ||
354 | |||
355 | /// <summary> | ||
356 | /// Change a parcel's bitmap at within a square and set those points to a specific value | ||
357 | /// </summary> | ||
358 | /// <param name="parcel_bitmap"></param> | ||
359 | /// <param name="start_x"></param> | ||
360 | /// <param name="start_y"></param> | ||
361 | /// <param name="end_x"></param> | ||
362 | /// <param name="end_y"></param> | ||
363 | /// <param name="set_value"></param> | ||
364 | /// <returns></returns> | ||
365 | public static bool[,] modifyParcelBitmapSquare(bool[,] parcel_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value) | ||
366 | { | ||
367 | if (parcel_bitmap.GetLength(0) != 64 || parcel_bitmap.GetLength(1) != 64 || parcel_bitmap.Rank != 2) | ||
368 | { | ||
369 | //Throw an exception - The bitmap is not 64x64 | ||
370 | throw new Exception("Error: Invalid Parcel Bitmap in modifyParcelBitmapSquare()"); | ||
371 | } | ||
372 | |||
373 | int x, y; | ||
374 | for (y = 0; y < 64; y++) | ||
375 | { | ||
376 | for (x = 0; x < 64; x++) | ||
377 | { | ||
378 | if (x >= start_x / 4 && x < end_x / 4 | ||
379 | && y >= start_y / 4 && y < end_y / 4) | ||
380 | { | ||
381 | parcel_bitmap[x, y] = set_value; | ||
382 | } | ||
383 | } | ||
384 | } | ||
385 | return parcel_bitmap; | ||
386 | } | ||
387 | /// <summary> | ||
388 | /// Join the true values of 2 bitmaps together | ||
389 | /// </summary> | ||
390 | /// <param name="bitmap_base"></param> | ||
391 | /// <param name="bitmap_add"></param> | ||
392 | /// <returns></returns> | ||
393 | public static bool[,] mergeParcelBitmaps(bool[,] bitmap_base, bool[,] bitmap_add) | ||
394 | { | ||
395 | if (bitmap_base.GetLength(0) != 64 || bitmap_base.GetLength(1) != 64 || bitmap_base.Rank != 2) | ||
396 | { | ||
397 | //Throw an exception - The bitmap is not 64x64 | ||
398 | throw new Exception("Error: Invalid Parcel Bitmap - Bitmap_base in mergeParcelBitmaps"); | ||
399 | } | ||
400 | if (bitmap_add.GetLength(0) != 64 || bitmap_add.GetLength(1) != 64 || bitmap_add.Rank != 2) | ||
401 | { | ||
402 | //Throw an exception - The bitmap is not 64x64 | ||
403 | throw new Exception("Error: Invalid Parcel Bitmap - Bitmap_add in mergeParcelBitmaps"); | ||
404 | |||
405 | } | ||
406 | |||
407 | int x, y; | ||
408 | for (y = 0; y < 64; y++) | ||
409 | { | ||
410 | for (x = 0; x < 64; x++) | ||
411 | { | ||
412 | if (bitmap_add[x, y]) | ||
413 | { | ||
414 | bitmap_base[x, y] = true; | ||
415 | } | ||
416 | } | ||
417 | } | ||
418 | return bitmap_base; | ||
419 | } | ||
420 | #endregion | ||
421 | |||
422 | #region Object Select and Object Owner Listing | ||
423 | public void sendForceObjectSelect(int local_id, int request_type, IClientAPI remote_client) | ||
424 | { | ||
425 | List<uint> resultLocalIDs = new List<uint>(); | ||
426 | foreach (SceneObject obj in primsOverMe) | ||
427 | { | ||
428 | if (obj.rootLocalID > 0) | ||
429 | { | ||
430 | if (request_type == LandManager.PARCEL_SELECT_OBJECTS_OWNER && obj.rootPrimitive.OwnerID == this.parcelData.ownerID) | ||
431 | { | ||
432 | resultLocalIDs.Add(obj.rootLocalID); | ||
433 | } | ||
434 | else if (request_type == LandManager.PARCEL_SELECT_OBJECTS_GROUP && false) //TODO: change false to group support! | ||
435 | { | ||
436 | |||
437 | } | ||
438 | else if (request_type == LandManager.PARCEL_SELECT_OBJECTS_OTHER && obj.rootPrimitive.OwnerID != remote_client.AgentId) | ||
439 | { | ||
440 | resultLocalIDs.Add(obj.rootLocalID); | ||
441 | } | ||
442 | } | ||
443 | } | ||
444 | |||
445 | |||
446 | bool firstCall = true; | ||
447 | int MAX_OBJECTS_PER_PACKET = 251; | ||
448 | ForceObjectSelectPacket pack = new ForceObjectSelectPacket(); | ||
449 | ForceObjectSelectPacket.DataBlock[] data; | ||
450 | while (resultLocalIDs.Count > 0) | ||
451 | { | ||
452 | if (firstCall) | ||
453 | { | ||
454 | pack._Header.ResetList = true; | ||
455 | firstCall = false; | ||
456 | } | ||
457 | else | ||
458 | { | ||
459 | pack._Header.ResetList = false; | ||
460 | } | ||
461 | |||
462 | if (resultLocalIDs.Count > MAX_OBJECTS_PER_PACKET) | ||
463 | { | ||
464 | data = new ForceObjectSelectPacket.DataBlock[MAX_OBJECTS_PER_PACKET]; | ||
465 | } | ||
466 | else | ||
467 | { | ||
468 | data = new ForceObjectSelectPacket.DataBlock[resultLocalIDs.Count]; | ||
469 | } | ||
470 | |||
471 | int i; | ||
472 | for (i = 0; i < MAX_OBJECTS_PER_PACKET && resultLocalIDs.Count > 0; i++) | ||
473 | { | ||
474 | data[i] = new ForceObjectSelectPacket.DataBlock(); | ||
475 | data[i].LocalID = Convert.ToUInt32(resultLocalIDs[0]); | ||
476 | resultLocalIDs.RemoveAt(0); | ||
477 | } | ||
478 | pack.Data = data; | ||
479 | remote_client.OutPacket((Packet)pack); | ||
480 | } | ||
481 | |||
482 | } | ||
483 | public void sendParcelObjectOwners(IClientAPI remote_client) | ||
484 | { | ||
485 | Dictionary<LLUUID, int> ownersAndCount = new Dictionary<LLUUID, int>(); | ||
486 | foreach (SceneObject obj in primsOverMe) | ||
487 | { | ||
488 | if (!ownersAndCount.ContainsKey(obj.rootPrimitive.OwnerID)) | ||
489 | { | ||
490 | ownersAndCount.Add(obj.rootPrimitive.OwnerID, 0); | ||
491 | } | ||
492 | ownersAndCount[obj.rootPrimitive.OwnerID] += obj.primCount; | ||
493 | } | ||
494 | if (ownersAndCount.Count > 0) | ||
495 | { | ||
496 | |||
497 | ParcelObjectOwnersReplyPacket.DataBlock[] dataBlock = new ParcelObjectOwnersReplyPacket.DataBlock[32]; | ||
498 | |||
499 | if (ownersAndCount.Count < 32) | ||
500 | { | ||
501 | dataBlock = new ParcelObjectOwnersReplyPacket.DataBlock[ownersAndCount.Count]; | ||
502 | } | ||
503 | |||
504 | |||
505 | int num = 0; | ||
506 | foreach (LLUUID owner in ownersAndCount.Keys) | ||
507 | { | ||
508 | dataBlock[num] = new ParcelObjectOwnersReplyPacket.DataBlock(); | ||
509 | dataBlock[num].Count = ownersAndCount[owner]; | ||
510 | dataBlock[num].IsGroupOwned = false; //TODO: fix me when group support is added | ||
511 | dataBlock[num].OnlineStatus = true; //TODO: fix me later | ||
512 | dataBlock[num].OwnerID = owner; | ||
513 | |||
514 | num++; | ||
515 | } | ||
516 | |||
517 | ParcelObjectOwnersReplyPacket pack = new ParcelObjectOwnersReplyPacket(); | ||
518 | pack.Data = dataBlock; | ||
519 | remote_client.OutPacket(pack); | ||
520 | } | ||
521 | } | ||
522 | #endregion | ||
523 | |||
524 | #region Object Returning | ||
525 | public void returnObject(SceneObject obj) | ||
526 | { | ||
527 | } | ||
528 | public void returnParcelObjects(int type, LLUUID owner) | ||
529 | { | ||
530 | |||
531 | } | ||
532 | #endregion | ||
533 | |||
534 | #region Object Adding/Removing from Parcel | ||
535 | public void resetParcelPrimCounts() | ||
536 | { | ||
537 | parcelData.groupPrims = 0; | ||
538 | parcelData.ownerPrims = 0; | ||
539 | parcelData.otherPrims = 0; | ||
540 | parcelData.selectedPrims = 0; | ||
541 | primsOverMe.Clear(); | ||
542 | } | ||
543 | |||
544 | public void addPrimToCount(SceneObject obj) | ||
545 | { | ||
546 | LLUUID prim_owner = obj.rootPrimitive.OwnerID; | ||
547 | int prim_count = obj.primCount; | ||
548 | |||
549 | if (obj.isSelected) | ||
550 | { | ||
551 | parcelData.selectedPrims += prim_count; | ||
552 | } | ||
553 | else | ||
554 | { | ||
555 | if (prim_owner == parcelData.ownerID) | ||
556 | { | ||
557 | parcelData.ownerPrims += prim_count; | ||
558 | } | ||
559 | else | ||
560 | { | ||
561 | parcelData.otherPrims += prim_count; | ||
562 | } | ||
563 | } | ||
564 | |||
565 | primsOverMe.Add(obj); | ||
566 | |||
567 | } | ||
568 | |||
569 | public void removePrimFromCount(SceneObject obj) | ||
570 | { | ||
571 | if (primsOverMe.Contains(obj)) | ||
572 | { | ||
573 | LLUUID prim_owner = obj.rootPrimitive.OwnerID; | ||
574 | int prim_count = obj.primCount; | ||
575 | |||
576 | if (prim_owner == parcelData.ownerID) | ||
577 | { | ||
578 | parcelData.ownerPrims -= prim_count; | ||
579 | } | ||
580 | else if (prim_owner == parcelData.groupID) | ||
581 | { | ||
582 | parcelData.groupPrims -= prim_count; | ||
583 | } | ||
584 | else | ||
585 | { | ||
586 | parcelData.otherPrims -= prim_count; | ||
587 | } | ||
588 | |||
589 | primsOverMe.Remove(obj); | ||
590 | } | ||
591 | } | ||
592 | #endregion | ||
593 | |||
594 | #endregion | ||
595 | |||
596 | |||
597 | } | ||
598 | #endregion | ||
599 | } | ||
diff --git a/OpenSim/Region/Environment/RegionManager.cs b/OpenSim/Region/Environment/RegionManager.cs index eb30389..92e2766 100644 --- a/OpenSim/Region/Environment/RegionManager.cs +++ b/OpenSim/Region/Environment/RegionManager.cs | |||
@@ -4,7 +4,7 @@ using OpenSim.Framework.Communications; | |||
4 | using OpenSim.Framework.Servers; | 4 | using OpenSim.Framework.Servers; |
5 | using OpenSim.Region.Capabilities; | 5 | using OpenSim.Region.Capabilities; |
6 | using OpenSim.Region.Environment.Scenes; | 6 | using OpenSim.Region.Environment.Scenes; |
7 | using OpenSim.Region.Environment.Parcels; | 7 | using OpenSim.Region.Environment.LandManagement; |
8 | 8 | ||
9 | namespace OpenSim.Region.Environment | 9 | namespace OpenSim.Region.Environment |
10 | { | 10 | { |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 5689308..917f6c4 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -45,7 +45,7 @@ using OpenSim.Region.Terrain; | |||
45 | using Caps = OpenSim.Region.Capabilities.Caps; | 45 | using Caps = OpenSim.Region.Capabilities.Caps; |
46 | using Timer = System.Timers.Timer; | 46 | using Timer = System.Timers.Timer; |
47 | 47 | ||
48 | using OpenSim.Region.Environment.Parcels; | 48 | using OpenSim.Region.Environment.LandManagement; |
49 | 49 | ||
50 | namespace OpenSim.Region.Environment.Scenes | 50 | namespace OpenSim.Region.Environment.Scenes |
51 | { | 51 | { |
@@ -63,7 +63,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
63 | private uint _primCount = 702000; | 63 | private uint _primCount = 702000; |
64 | private System.Threading.Mutex _primAllocateMutex = new Mutex(false); | 64 | private System.Threading.Mutex _primAllocateMutex = new Mutex(false); |
65 | private int storageCount; | 65 | private int storageCount; |
66 | private int parcelPrimCheckCount; | 66 | private int landPrimCheckCount; |
67 | private Mutex updateLock; | 67 | private Mutex updateLock; |
68 | 68 | ||
69 | protected AuthenticateSessionsBase authenticateHandler; | 69 | protected AuthenticateSessionsBase authenticateHandler; |
@@ -146,7 +146,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
146 | m_scriptManager = new ScriptManager(this); | 146 | m_scriptManager = new ScriptManager(this); |
147 | m_eventManager = new EventManager(); | 147 | m_eventManager = new EventManager(); |
148 | 148 | ||
149 | m_eventManager.OnParcelPrimCountAdd += new EventManager.OnParcelPrimCountAddDelegate(m_LandManager.addPrimToParcelCounts); | 149 | m_eventManager.OnParcelPrimCountAdd += new EventManager.OnParcelPrimCountAddDelegate(m_LandManager.addPrimToLandPrimCounts); |
150 | 150 | ||
151 | MainLog.Instance.Verbose("World.cs - creating new entitities instance"); | 151 | MainLog.Instance.Verbose("World.cs - creating new entitities instance"); |
152 | Entities = new Dictionary<LLUUID, EntityBase>(); | 152 | Entities = new Dictionary<LLUUID, EntityBase>(); |
@@ -244,14 +244,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
244 | storageCount = 0; | 244 | storageCount = 0; |
245 | } | 245 | } |
246 | 246 | ||
247 | this.parcelPrimCheckCount++; | 247 | this.landPrimCheckCount++; |
248 | if (this.parcelPrimCheckCount > 50) //check every 5 seconds for tainted prims | 248 | if (this.landPrimCheckCount > 50) //check every 5 seconds for tainted prims |
249 | { | 249 | { |
250 | if (m_LandManager.parcelPrimCountTainted) | 250 | if (m_LandManager.landPrimCountTainted) |
251 | { | 251 | { |
252 | //Perform parcel update of prim count | 252 | //Perform land update of prim count |
253 | performParcelPrimCountUpdate(); | 253 | performParcelPrimCountUpdate(); |
254 | this.parcelPrimCheckCount = 0; | 254 | this.landPrimCheckCount = 0; |
255 | } | 255 | } |
256 | } | 256 | } |
257 | 257 | ||
@@ -513,7 +513,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
513 | { | 513 | { |
514 | if (this.Entities.ContainsKey(sceneObject.rootUUID)) | 514 | if (this.Entities.ContainsKey(sceneObject.rootUUID)) |
515 | { | 515 | { |
516 | m_LandManager.removePrimFromParcelCounts(sceneObject); | 516 | m_LandManager.removePrimFromLandPrimCounts(sceneObject); |
517 | this.Entities.Remove(sceneObject.rootUUID); | 517 | this.Entities.Remove(sceneObject.rootUUID); |
518 | m_LandManager.setPrimsTainted(); | 518 | m_LandManager.setPrimsTainted(); |
519 | } | 519 | } |
@@ -910,10 +910,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
910 | 910 | ||
911 | public void performParcelPrimCountUpdate() | 911 | public void performParcelPrimCountUpdate() |
912 | { | 912 | { |
913 | m_LandManager.resetAllParcelPrimCounts(); | 913 | m_LandManager.resetAllLandPrimCounts(); |
914 | m_eventManager.TriggerParcelPrimCountUpdate(); | 914 | m_eventManager.TriggerParcelPrimCountUpdate(); |
915 | m_LandManager.finalizeParcelPrimCountUpdate(); | 915 | m_LandManager.finalizeLandPrimCountUpdate(); |
916 | m_LandManager.parcelPrimCountTainted = false; | 916 | m_LandManager.landPrimCountTainted = false; |
917 | } | 917 | } |
918 | #endregion | 918 | #endregion |
919 | 919 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject.cs index 43d41e6..f0b25ce 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObject.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObject.cs | |||
@@ -132,7 +132,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
132 | } | 132 | } |
133 | 133 | ||
134 | /// <summary> | 134 | /// <summary> |
135 | /// Sends my primitive info to the parcel manager for it to keep tally of all of the prims! | 135 | /// Sends my primitive info to the land manager for it to keep tally of all of the prims! |
136 | /// </summary> | 136 | /// </summary> |
137 | private void ProcessParcelPrimCountUpdate() | 137 | private void ProcessParcelPrimCountUpdate() |
138 | { | 138 | { |
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index 631e076..a2fdd81 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs | |||
@@ -82,7 +82,7 @@ namespace SimpleApp | |||
82 | if (masterAvatar != null) | 82 | if (masterAvatar != null) |
83 | { | 83 | { |
84 | world.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; | 84 | world.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; |
85 | world.LandManager.NoParcelDataFromStorage(); | 85 | world.LandManager.NoLandDataFromStorage(); |
86 | } | 86 | } |
87 | 87 | ||
88 | world.StartTimer(); | 88 | world.StartTimer(); |
diff --git a/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs index 0a88594..1c0a4a3 100644 --- a/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs +++ b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs | |||
@@ -82,25 +82,25 @@ namespace OpenSim.Region.Storage.LocalStorageBDB | |||
82 | 82 | ||
83 | } | 83 | } |
84 | 84 | ||
85 | public void SaveParcels(ParcelData[] parcel_data) | 85 | public void SaveLandObjects(LandData[] land_data) |
86 | { | 86 | { |
87 | } | 87 | } |
88 | 88 | ||
89 | public void SaveParcel(ParcelData parcel) | 89 | public void SaveLandObject(LandData land) |
90 | { | 90 | { |
91 | } | 91 | } |
92 | 92 | ||
93 | public void RemoveParcel(ParcelData parcel) | 93 | public void RemoveLandObject(LandData land) |
94 | { | 94 | { |
95 | } | 95 | } |
96 | 96 | ||
97 | public void RemoveAllParcels() | 97 | public void RemoveAllLandObjects() |
98 | { | 98 | { |
99 | } | 99 | } |
100 | 100 | ||
101 | public void LoadParcels(ILocalStorageParcelReceiver recv) | 101 | public void LoadLandObjects(ILocalStorageLandObjectReceiver recv) |
102 | { | 102 | { |
103 | recv.NoParcelDataFromStorage(); | 103 | recv.NoLandDataFromStorage(); |
104 | } | 104 | } |
105 | 105 | ||
106 | public void ShutDown() | 106 | public void ShutDown() |
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs index 8d9f473..5dc5a3b 100644 --- a/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs +++ b/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs | |||
@@ -157,106 +157,106 @@ namespace OpenSim.Region.Storage.LocalStorageDb4o | |||
157 | db.Commit(); | 157 | db.Commit(); |
158 | } | 158 | } |
159 | 159 | ||
160 | public void SaveParcel(ParcelData parcel) | 160 | public void SaveLandObject(LandData landObject) |
161 | { | 161 | { |
162 | IObjectSet result = db.Query(new UUIDParcelQuery(parcel.globalID)); | 162 | IObjectSet result = db.Query(new UUIDLandQuery(landObject.globalID)); |
163 | if (result.Count > 0) | 163 | if (result.Count > 0) |
164 | { | 164 | { |
165 | //Old Parcel | 165 | //Old Land |
166 | ParcelData updateParcel = (ParcelData)result.Next(); | 166 | LandData updateLand = (LandData)result.Next(); |
167 | updateParcel.AABBMax = parcel.AABBMax; | 167 | updateLand.AABBMax = landObject.AABBMax; |
168 | updateParcel.AABBMin = parcel.AABBMin; | 168 | updateLand.AABBMin = landObject.AABBMin; |
169 | updateParcel.area = parcel.area; | 169 | updateLand.area = landObject.area; |
170 | updateParcel.auctionID = parcel.auctionID; | 170 | updateLand.auctionID = landObject.auctionID; |
171 | updateParcel.authBuyerID = parcel.authBuyerID; | 171 | updateLand.authBuyerID = landObject.authBuyerID; |
172 | updateParcel.category = parcel.category; | 172 | updateLand.category = landObject.category; |
173 | updateParcel.claimDate = parcel.claimDate; | 173 | updateLand.claimDate = landObject.claimDate; |
174 | updateParcel.claimPrice = parcel.claimPrice; | 174 | updateLand.claimPrice = landObject.claimPrice; |
175 | updateParcel.groupID = parcel.groupID; | 175 | updateLand.groupID = landObject.groupID; |
176 | updateParcel.groupPrims = parcel.groupPrims; | 176 | updateLand.groupPrims = landObject.groupPrims; |
177 | updateParcel.isGroupOwned = parcel.isGroupOwned; | 177 | updateLand.isGroupOwned = landObject.isGroupOwned; |
178 | updateParcel.landingType = parcel.landingType; | 178 | updateLand.landingType = landObject.landingType; |
179 | updateParcel.mediaAutoScale = parcel.mediaAutoScale; | 179 | updateLand.mediaAutoScale = landObject.mediaAutoScale; |
180 | updateParcel.mediaID = parcel.mediaID; | 180 | updateLand.mediaID = landObject.mediaID; |
181 | updateParcel.mediaURL = parcel.mediaURL; | 181 | updateLand.mediaURL = landObject.mediaURL; |
182 | updateParcel.musicURL = parcel.musicURL; | 182 | updateLand.musicURL = landObject.musicURL; |
183 | updateParcel.localID = parcel.localID; | 183 | updateLand.localID = landObject.localID; |
184 | updateParcel.ownerID = parcel.ownerID; | 184 | updateLand.ownerID = landObject.ownerID; |
185 | updateParcel.passHours = parcel.passHours; | 185 | updateLand.passHours = landObject.passHours; |
186 | updateParcel.passPrice = parcel.passPrice; | 186 | updateLand.passPrice = landObject.passPrice; |
187 | updateParcel.parcelBitmapByteArray = (byte[])parcel.parcelBitmapByteArray.Clone(); | 187 | updateLand.landBitmapByteArray = (byte[])landObject.landBitmapByteArray.Clone(); |
188 | updateParcel.parcelDesc = parcel.parcelDesc; | 188 | updateLand.landDesc = landObject.landDesc; |
189 | updateParcel.parcelFlags = parcel.parcelFlags; | 189 | updateLand.landFlags = landObject.landFlags; |
190 | updateParcel.parcelName = parcel.parcelName; | 190 | updateLand.landName = landObject.landName; |
191 | updateParcel.parcelStatus = parcel.parcelStatus; | 191 | updateLand.landStatus = landObject.landStatus; |
192 | updateParcel.salePrice = parcel.salePrice; | 192 | updateLand.salePrice = landObject.salePrice; |
193 | updateParcel.snapshotID = parcel.snapshotID; | 193 | updateLand.snapshotID = landObject.snapshotID; |
194 | updateParcel.userLocation = parcel.userLocation; | 194 | updateLand.userLocation = landObject.userLocation; |
195 | updateParcel.userLookAt = parcel.userLookAt; | 195 | updateLand.userLookAt = landObject.userLookAt; |
196 | 196 | ||
197 | db.Set(updateParcel); | 197 | db.Set(updateLand); |
198 | } | 198 | } |
199 | else | 199 | else |
200 | { | 200 | { |
201 | db.Set(parcel); | 201 | db.Set(landObject); |
202 | } | 202 | } |
203 | db.Commit(); | 203 | db.Commit(); |
204 | } | 204 | } |
205 | 205 | ||
206 | public void SaveParcels(ParcelData[] parcel_data) | 206 | public void SaveLandObjects(LandData[] landObject_data) |
207 | { | 207 | { |
208 | MainLog.Instance.Notice("Parcel Backup: Saving Parcels..."); | 208 | MainLog.Instance.Notice("Land Backup: Saving Lands..."); |
209 | int i; | 209 | int i; |
210 | for (i = 0; i < parcel_data.GetLength(0); i++) | 210 | for (i = 0; i < landObject_data.GetLength(0); i++) |
211 | { | 211 | { |
212 | 212 | ||
213 | SaveParcel(parcel_data[i]); | 213 | SaveLandObject(landObject_data[i]); |
214 | 214 | ||
215 | } | 215 | } |
216 | MainLog.Instance.Notice("Parcel Backup: Parcel Save Complete"); | 216 | MainLog.Instance.Notice("Land Backup: Land Save Complete"); |
217 | } | 217 | } |
218 | 218 | ||
219 | public void RemoveParcel(ParcelData parcel) | 219 | public void RemoveLandObject(LandData landObject) |
220 | { | 220 | { |
221 | IObjectSet result = db.Query(new UUIDParcelQuery(parcel.globalID)); | 221 | IObjectSet result = db.Query(new UUIDLandQuery(landObject.globalID)); |
222 | if (result.Count > 0) | 222 | if (result.Count > 0) |
223 | { | 223 | { |
224 | db.Delete(result[0]); | 224 | db.Delete(result[0]); |
225 | } | 225 | } |
226 | db.Commit(); | 226 | db.Commit(); |
227 | } | 227 | } |
228 | public void RemoveAllParcels() | 228 | public void RemoveAllLandObjects() |
229 | { | 229 | { |
230 | MainLog.Instance.Notice("Parcel Backup: Removing all parcels..."); | 230 | MainLog.Instance.Notice("Land Backup: Removing all land objects..."); |
231 | IObjectSet result = db.Get(typeof(ParcelData)); | 231 | IObjectSet result = db.Get(typeof(LandData)); |
232 | if (result.Count > 0) | 232 | if (result.Count > 0) |
233 | { | 233 | { |
234 | foreach (ParcelData parcelData in result) | 234 | foreach (LandData landData in result) |
235 | { | 235 | { |
236 | RemoveParcel(parcelData); | 236 | RemoveLandObject(landData); |
237 | } | 237 | } |
238 | } | 238 | } |
239 | } | 239 | } |
240 | 240 | ||
241 | public void LoadParcels(ILocalStorageParcelReceiver recv) | 241 | public void LoadLandObjects(ILocalStorageLandObjectReceiver recv) |
242 | { | 242 | { |
243 | MainLog.Instance.Notice("Parcel Backup: Loading Parcels..."); | 243 | MainLog.Instance.Notice("Land Backup: Loading Lands..."); |
244 | IObjectSet result = db.Get(typeof(ParcelData)); | 244 | IObjectSet result = db.Get(typeof(LandData)); |
245 | if (result.Count > 0) | 245 | if (result.Count > 0) |
246 | { | 246 | { |
247 | MainLog.Instance.Notice("Parcel Backup: Parcels exist in database."); | 247 | MainLog.Instance.Notice("Land Backup: Lands exist in database."); |
248 | foreach (ParcelData parcelData in result) | 248 | foreach (LandData landData in result) |
249 | { | 249 | { |
250 | 250 | ||
251 | recv.ParcelFromStorage(parcelData); | 251 | recv.LandFromStorage(landData); |
252 | } | 252 | } |
253 | } | 253 | } |
254 | else | 254 | else |
255 | { | 255 | { |
256 | MainLog.Instance.Notice("Parcel Backup: No parcels exist. Creating basic parcel."); | 256 | MainLog.Instance.Notice("Land Backup: No landObjects exist. Creating basic landObject."); |
257 | recv.NoParcelDataFromStorage(); | 257 | recv.NoLandDataFromStorage(); |
258 | } | 258 | } |
259 | MainLog.Instance.Notice("Parcel Backup: Parcels Restored"); | 259 | MainLog.Instance.Notice("Land Backup: Lands Restored"); |
260 | } | 260 | } |
261 | public void ShutDown() | 261 | public void ShutDown() |
262 | { | 262 | { |
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDLandQuery.cs index debaa88..6c5b2fb 100644 --- a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs +++ b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDLandQuery.cs | |||
@@ -1,47 +1,47 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.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 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using Db4objects.Db4o.Query; | 28 | using Db4objects.Db4o.Query; |
29 | using libsecondlife; | 29 | using libsecondlife; |
30 | using OpenSim.Framework.Types; | 30 | using OpenSim.Framework.Types; |
31 | 31 | ||
32 | namespace OpenSim.Region.Storage.LocalStorageDb4o | 32 | namespace OpenSim.Region.Storage.LocalStorageDb4o |
33 | { | 33 | { |
34 | public class UUIDParcelQuery : Predicate | 34 | public class UUIDLandQuery : Predicate |
35 | { | 35 | { |
36 | private LLUUID globalIDSearch; | 36 | private LLUUID globalIDSearch; |
37 | 37 | ||
38 | public UUIDParcelQuery(LLUUID find) | 38 | public UUIDLandQuery(LLUUID find) |
39 | { | 39 | { |
40 | globalIDSearch = find; | 40 | globalIDSearch = find; |
41 | } | 41 | } |
42 | public bool Match(ParcelData parcel) | 42 | public bool Match(LandData land) |
43 | { | 43 | { |
44 | return (parcel.globalID == globalIDSearch); | 44 | return (land.globalID == globalIDSearch); |
45 | } | 45 | } |
46 | } | 46 | } |
47 | } | 47 | } |
diff --git a/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs b/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs index 599ff6c..88c5bde 100644 --- a/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs +++ b/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs | |||
@@ -167,26 +167,26 @@ namespace OpenSim.Region.Storage.LocalStorageSQLite | |||
167 | 167 | ||
168 | } | 168 | } |
169 | 169 | ||
170 | public void SaveParcels(ParcelData[] parcel_manager) | 170 | public void SaveLandObjects(LandData[] land_manager) |
171 | { | 171 | { |
172 | 172 | ||
173 | } | 173 | } |
174 | 174 | ||
175 | public void SaveParcel(ParcelData parcel) | 175 | public void SaveLandObject(LandData land) |
176 | { | 176 | { |
177 | } | 177 | } |
178 | 178 | ||
179 | public void RemoveParcel(ParcelData parcel) | 179 | public void RemoveLandObject(LandData land) |
180 | { | 180 | { |
181 | } | 181 | } |
182 | 182 | ||
183 | public void RemoveAllParcels() | 183 | public void RemoveAllLandObjects() |
184 | { | 184 | { |
185 | } | 185 | } |
186 | 186 | ||
187 | public void LoadParcels(ILocalStorageParcelReceiver recv) | 187 | public void LoadLandObjects(ILocalStorageLandObjectReceiver recv) |
188 | { | 188 | { |
189 | recv.NoParcelDataFromStorage(); | 189 | recv.NoLandDataFromStorage(); |
190 | } | 190 | } |
191 | 191 | ||
192 | public void ShutDown() | 192 | public void ShutDown() |
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs index 9dc20c3..fc003e8 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs | |||
@@ -3,7 +3,7 @@ using System.Collections.Generic; | |||
3 | using System.Text; | 3 | using System.Text; |
4 | 4 | ||
5 | using OpenSim.Region.Environment.Scenes; | 5 | using OpenSim.Region.Environment.Scenes; |
6 | using OpenSim.Region.Environment; | 6 | using OpenSim.Region.Environment.LandManagement; |
7 | using OpenSim.Region.Interfaces; | 7 | using OpenSim.Region.Interfaces; |
8 | using OpenSim.Framework.Console; | 8 | using OpenSim.Framework.Console; |
9 | using libsecondlife; | 9 | using libsecondlife; |
@@ -43,19 +43,19 @@ namespace OpenSim.DataStore.NullStorage | |||
43 | return null; | 43 | return null; |
44 | } | 44 | } |
45 | 45 | ||
46 | public void RemoveParcel(uint id) | 46 | public void RemoveLandObject(uint id) |
47 | { | 47 | { |
48 | 48 | ||
49 | } | 49 | } |
50 | 50 | ||
51 | public void StoreParcel(OpenSim.Region.Environment.Parcels.Parcel parcel) | 51 | public void StoreParcel(Land land) |
52 | { | 52 | { |
53 | 53 | ||
54 | } | 54 | } |
55 | 55 | ||
56 | public List<OpenSim.Region.Environment.Parcels.Parcel> LoadParcels() | 56 | public List<Land> LoadLandObjects() |
57 | { | 57 | { |
58 | return new List<OpenSim.Region.Environment.Parcels.Parcel>(); | 58 | return new List<Land>(); |
59 | } | 59 | } |
60 | 60 | ||
61 | public void Shutdown() | 61 | public void Shutdown() |