diff options
author | Teravus Ovares | 2008-09-06 07:52:41 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-09-06 07:52:41 +0000 |
commit | 7d89e122930be39e84a6d174548fa2d12ac0484a (patch) | |
tree | e5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Data/SQLite/SQLiteRegionData.cs | |
parent | * minor: speculatively try a change to bamboo.build to see if this generates ... (diff) | |
download | opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.zip opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2 opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz |
* This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle.
* This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big!
* Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteRegionData.cs')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteRegionData.cs | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index dd88751..bb441f6 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -31,7 +31,7 @@ using System.Data; | |||
31 | using System.IO; | 31 | using System.IO; |
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using System.Threading; | 33 | using System.Threading; |
34 | using libsecondlife; | 34 | using OpenMetaverse; |
35 | using log4net; | 35 | using log4net; |
36 | using Mono.Data.SqliteClient; | 36 | using Mono.Data.SqliteClient; |
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
@@ -190,7 +190,7 @@ namespace OpenSim.Data.SQLite | |||
190 | { | 190 | { |
191 | } | 191 | } |
192 | 192 | ||
193 | public RegionSettings LoadRegionSettings(LLUUID regionUUID) | 193 | public RegionSettings LoadRegionSettings(UUID regionUUID) |
194 | { | 194 | { |
195 | return null; | 195 | return null; |
196 | } | 196 | } |
@@ -200,15 +200,15 @@ namespace OpenSim.Data.SQLite | |||
200 | /// </summary> | 200 | /// </summary> |
201 | /// <param name="obj">the object</param> | 201 | /// <param name="obj">the object</param> |
202 | /// <param name="regionUUID">the region UUID</param> | 202 | /// <param name="regionUUID">the region UUID</param> |
203 | public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) | 203 | public void StoreObject(SceneObjectGroup obj, UUID regionUUID) |
204 | { | 204 | { |
205 | lock (ds) | 205 | lock (ds) |
206 | { | 206 | { |
207 | foreach (SceneObjectPart prim in obj.Children.Values) | 207 | foreach (SceneObjectPart prim in obj.Children.Values) |
208 | { | 208 | { |
209 | if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0 | 209 | if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == 0 |
210 | && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0 | 210 | && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0 |
211 | && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0) | 211 | && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0) |
212 | { | 212 | { |
213 | //m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); | 213 | //m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); |
214 | addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); | 214 | addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); |
@@ -235,9 +235,9 @@ namespace OpenSim.Data.SQLite | |||
235 | /// </summary> | 235 | /// </summary> |
236 | /// <param name="obj">the object</param> | 236 | /// <param name="obj">the object</param> |
237 | /// <param name="regionUUID">the region UUID</param> | 237 | /// <param name="regionUUID">the region UUID</param> |
238 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) | 238 | public void RemoveObject(UUID obj, UUID regionUUID) |
239 | { | 239 | { |
240 | m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); | 240 | m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.Guid, regionUUID); |
241 | 241 | ||
242 | DataTable prims = ds.Tables["prims"]; | 242 | DataTable prims = ds.Tables["prims"]; |
243 | DataTable shapes = ds.Tables["primshapes"]; | 243 | DataTable shapes = ds.Tables["primshapes"]; |
@@ -249,7 +249,7 @@ namespace OpenSim.Data.SQLite | |||
249 | foreach (DataRow row in primRows) | 249 | foreach (DataRow row in primRows) |
250 | { | 250 | { |
251 | // Remove shape rows | 251 | // Remove shape rows |
252 | LLUUID uuid = new LLUUID((string) row["UUID"]); | 252 | UUID uuid = new UUID((string) row["UUID"]); |
253 | DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(uuid)); | 253 | DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(uuid)); |
254 | if (shapeRow != null) | 254 | if (shapeRow != null) |
255 | { | 255 | { |
@@ -271,7 +271,7 @@ namespace OpenSim.Data.SQLite | |||
271 | /// The caller must acquire the necessrary synchronization locks and commit or rollback changes. | 271 | /// The caller must acquire the necessrary synchronization locks and commit or rollback changes. |
272 | /// </summary> | 272 | /// </summary> |
273 | /// <param name="uuid">The item UUID</param> | 273 | /// <param name="uuid">The item UUID</param> |
274 | private void RemoveItems(LLUUID uuid) | 274 | private void RemoveItems(UUID uuid) |
275 | { | 275 | { |
276 | DataTable items = ds.Tables["primitems"]; | 276 | DataTable items = ds.Tables["primitems"]; |
277 | 277 | ||
@@ -289,9 +289,9 @@ namespace OpenSim.Data.SQLite | |||
289 | /// </summary> | 289 | /// </summary> |
290 | /// <param name="regionUUID">The region UUID</param> | 290 | /// <param name="regionUUID">The region UUID</param> |
291 | /// <returns>List of loaded groups</returns> | 291 | /// <returns>List of loaded groups</returns> |
292 | public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) | 292 | public List<SceneObjectGroup> LoadObjects(UUID regionUUID) |
293 | { | 293 | { |
294 | Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>(); | 294 | Dictionary<UUID, SceneObjectGroup> createdObjects = new Dictionary<UUID, SceneObjectGroup>(); |
295 | 295 | ||
296 | List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); | 296 | List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); |
297 | 297 | ||
@@ -350,7 +350,7 @@ namespace OpenSim.Data.SQLite | |||
350 | "[REGION DB]: No shape found for prim in storage, so setting default box shape"); | 350 | "[REGION DB]: No shape found for prim in storage, so setting default box shape"); |
351 | prim.Shape = PrimitiveBaseShape.Default; | 351 | prim.Shape = PrimitiveBaseShape.Default; |
352 | } | 352 | } |
353 | createdObjects[new LLUUID(objID)].AddPart(prim); | 353 | createdObjects[new UUID(objID)].AddPart(prim); |
354 | } | 354 | } |
355 | 355 | ||
356 | LoadItems(prim); | 356 | LoadItems(prim); |
@@ -379,7 +379,7 @@ namespace OpenSim.Data.SQLite | |||
379 | 379 | ||
380 | DataTable dbItems = ds.Tables["primitems"]; | 380 | DataTable dbItems = ds.Tables["primitems"]; |
381 | 381 | ||
382 | String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); | 382 | String sql = String.Format("primID = '{0}'", prim.ToString()); |
383 | DataRow[] dbItemRows = dbItems.Select(sql); | 383 | DataRow[] dbItemRows = dbItems.Select(sql); |
384 | 384 | ||
385 | IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); | 385 | IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); |
@@ -407,7 +407,7 @@ namespace OpenSim.Data.SQLite | |||
407 | /// </summary> | 407 | /// </summary> |
408 | /// <param name="ter">terrain heightfield</param> | 408 | /// <param name="ter">terrain heightfield</param> |
409 | /// <param name="regionID">region UUID</param> | 409 | /// <param name="regionID">region UUID</param> |
410 | public void StoreTerrain(double[,] ter, LLUUID regionID) | 410 | public void StoreTerrain(double[,] ter, UUID regionID) |
411 | { | 411 | { |
412 | lock (ds) | 412 | lock (ds) |
413 | { | 413 | { |
@@ -451,7 +451,7 @@ namespace OpenSim.Data.SQLite | |||
451 | /// </summary> | 451 | /// </summary> |
452 | /// <param name="regionID">the region UUID</param> | 452 | /// <param name="regionID">the region UUID</param> |
453 | /// <returns>Heightfield data</returns> | 453 | /// <returns>Heightfield data</returns> |
454 | public double[,] LoadTerrain(LLUUID regionID) | 454 | public double[,] LoadTerrain(UUID regionID) |
455 | { | 455 | { |
456 | lock (ds) | 456 | lock (ds) |
457 | { | 457 | { |
@@ -499,7 +499,7 @@ namespace OpenSim.Data.SQLite | |||
499 | /// | 499 | /// |
500 | /// </summary> | 500 | /// </summary> |
501 | /// <param name="globalID"></param> | 501 | /// <param name="globalID"></param> |
502 | public void RemoveLandObject(LLUUID globalID) | 502 | public void RemoveLandObject(UUID globalID) |
503 | { | 503 | { |
504 | lock (ds) | 504 | lock (ds) |
505 | { | 505 | { |
@@ -563,7 +563,7 @@ namespace OpenSim.Data.SQLite | |||
563 | /// </summary> | 563 | /// </summary> |
564 | /// <param name="regionUUID"></param> | 564 | /// <param name="regionUUID"></param> |
565 | /// <returns></returns> | 565 | /// <returns></returns> |
566 | public List<LandData> LoadLandObjects(LLUUID regionUUID) | 566 | public List<LandData> LoadLandObjects(UUID regionUUID) |
567 | { | 567 | { |
568 | List<LandData> landDataForRegion = new List<LandData>(); | 568 | List<LandData> landDataForRegion = new List<LandData>(); |
569 | lock (ds) | 569 | lock (ds) |
@@ -821,12 +821,12 @@ namespace OpenSim.Data.SQLite | |||
821 | createCol(land, "IsGroupOwned", typeof (Boolean)); | 821 | createCol(land, "IsGroupOwned", typeof (Boolean)); |
822 | createCol(land, "Area", typeof (Int32)); | 822 | createCol(land, "Area", typeof (Int32)); |
823 | createCol(land, "AuctionID", typeof (Int32)); //Unemplemented | 823 | createCol(land, "AuctionID", typeof (Int32)); //Unemplemented |
824 | createCol(land, "Category", typeof (Int32)); //Enum libsecondlife.Parcel.ParcelCategory | 824 | createCol(land, "Category", typeof (Int32)); //Enum OpenMetaverse.Parcel.ParcelCategory |
825 | createCol(land, "ClaimDate", typeof (Int32)); | 825 | createCol(land, "ClaimDate", typeof (Int32)); |
826 | createCol(land, "ClaimPrice", typeof (Int32)); | 826 | createCol(land, "ClaimPrice", typeof (Int32)); |
827 | createCol(land, "GroupUUID", typeof (string)); | 827 | createCol(land, "GroupUUID", typeof (string)); |
828 | createCol(land, "SalePrice", typeof (Int32)); | 828 | createCol(land, "SalePrice", typeof (Int32)); |
829 | createCol(land, "LandStatus", typeof (Int32)); //Enum. libsecondlife.Parcel.ParcelStatus | 829 | createCol(land, "LandStatus", typeof (Int32)); //Enum. OpenMetaverse.Parcel.ParcelStatus |
830 | createCol(land, "LandFlags", typeof (UInt32)); | 830 | createCol(land, "LandFlags", typeof (UInt32)); |
831 | createCol(land, "LandingType", typeof (Byte)); | 831 | createCol(land, "LandingType", typeof (Byte)); |
832 | createCol(land, "MediaAutoScale", typeof (Byte)); | 832 | createCol(land, "MediaAutoScale", typeof (Byte)); |
@@ -882,7 +882,7 @@ namespace OpenSim.Data.SQLite | |||
882 | // interesting has to be done to actually get these values | 882 | // interesting has to be done to actually get these values |
883 | // back out. Not enough time to figure it out yet. | 883 | // back out. Not enough time to figure it out yet. |
884 | SceneObjectPart prim = new SceneObjectPart(); | 884 | SceneObjectPart prim = new SceneObjectPart(); |
885 | prim.UUID = new LLUUID((String) row["UUID"]); | 885 | prim.UUID = new UUID((String) row["UUID"]); |
886 | // explicit conversion of integers is required, which sort | 886 | // explicit conversion of integers is required, which sort |
887 | // of sucks. No idea if there is a shortcut here or not. | 887 | // of sucks. No idea if there is a shortcut here or not. |
888 | prim.ParentID = Convert.ToUInt32(row["ParentID"]); | 888 | prim.ParentID = Convert.ToUInt32(row["ParentID"]); |
@@ -895,43 +895,43 @@ namespace OpenSim.Data.SQLite | |||
895 | prim.TouchName = (String) row["TouchName"]; | 895 | prim.TouchName = (String) row["TouchName"]; |
896 | // permissions | 896 | // permissions |
897 | prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); | 897 | prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); |
898 | prim.CreatorID = new LLUUID((String) row["CreatorID"]); | 898 | prim.CreatorID = new UUID((String) row["CreatorID"]); |
899 | prim.OwnerID = new LLUUID((String) row["OwnerID"]); | 899 | prim.OwnerID = new UUID((String) row["OwnerID"]); |
900 | prim.GroupID = new LLUUID((String) row["GroupID"]); | 900 | prim.GroupID = new UUID((String) row["GroupID"]); |
901 | prim.LastOwnerID = new LLUUID((String) row["LastOwnerID"]); | 901 | prim.LastOwnerID = new UUID((String) row["LastOwnerID"]); |
902 | prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]); | 902 | prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]); |
903 | prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]); | 903 | prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]); |
904 | prim.GroupMask = Convert.ToUInt32(row["GroupMask"]); | 904 | prim.GroupMask = Convert.ToUInt32(row["GroupMask"]); |
905 | prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]); | 905 | prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]); |
906 | prim.BaseMask = Convert.ToUInt32(row["BaseMask"]); | 906 | prim.BaseMask = Convert.ToUInt32(row["BaseMask"]); |
907 | // vectors | 907 | // vectors |
908 | prim.OffsetPosition = new LLVector3( | 908 | prim.OffsetPosition = new Vector3( |
909 | Convert.ToSingle(row["PositionX"]), | 909 | Convert.ToSingle(row["PositionX"]), |
910 | Convert.ToSingle(row["PositionY"]), | 910 | Convert.ToSingle(row["PositionY"]), |
911 | Convert.ToSingle(row["PositionZ"]) | 911 | Convert.ToSingle(row["PositionZ"]) |
912 | ); | 912 | ); |
913 | prim.GroupPosition = new LLVector3( | 913 | prim.GroupPosition = new Vector3( |
914 | Convert.ToSingle(row["GroupPositionX"]), | 914 | Convert.ToSingle(row["GroupPositionX"]), |
915 | Convert.ToSingle(row["GroupPositionY"]), | 915 | Convert.ToSingle(row["GroupPositionY"]), |
916 | Convert.ToSingle(row["GroupPositionZ"]) | 916 | Convert.ToSingle(row["GroupPositionZ"]) |
917 | ); | 917 | ); |
918 | prim.Velocity = new LLVector3( | 918 | prim.Velocity = new Vector3( |
919 | Convert.ToSingle(row["VelocityX"]), | 919 | Convert.ToSingle(row["VelocityX"]), |
920 | Convert.ToSingle(row["VelocityY"]), | 920 | Convert.ToSingle(row["VelocityY"]), |
921 | Convert.ToSingle(row["VelocityZ"]) | 921 | Convert.ToSingle(row["VelocityZ"]) |
922 | ); | 922 | ); |
923 | prim.AngularVelocity = new LLVector3( | 923 | prim.AngularVelocity = new Vector3( |
924 | Convert.ToSingle(row["AngularVelocityX"]), | 924 | Convert.ToSingle(row["AngularVelocityX"]), |
925 | Convert.ToSingle(row["AngularVelocityY"]), | 925 | Convert.ToSingle(row["AngularVelocityY"]), |
926 | Convert.ToSingle(row["AngularVelocityZ"]) | 926 | Convert.ToSingle(row["AngularVelocityZ"]) |
927 | ); | 927 | ); |
928 | prim.Acceleration = new LLVector3( | 928 | prim.Acceleration = new Vector3( |
929 | Convert.ToSingle(row["AccelerationX"]), | 929 | Convert.ToSingle(row["AccelerationX"]), |
930 | Convert.ToSingle(row["AccelerationY"]), | 930 | Convert.ToSingle(row["AccelerationY"]), |
931 | Convert.ToSingle(row["AccelerationZ"]) | 931 | Convert.ToSingle(row["AccelerationZ"]) |
932 | ); | 932 | ); |
933 | // quaternions | 933 | // quaternions |
934 | prim.RotationOffset = new LLQuaternion( | 934 | prim.RotationOffset = new Quaternion( |
935 | Convert.ToSingle(row["RotationX"]), | 935 | Convert.ToSingle(row["RotationX"]), |
936 | Convert.ToSingle(row["RotationY"]), | 936 | Convert.ToSingle(row["RotationY"]), |
937 | Convert.ToSingle(row["RotationZ"]), | 937 | Convert.ToSingle(row["RotationZ"]), |
@@ -940,11 +940,11 @@ namespace OpenSim.Data.SQLite | |||
940 | 940 | ||
941 | try | 941 | try |
942 | { | 942 | { |
943 | prim.SitTargetPositionLL = new LLVector3( | 943 | prim.SitTargetPositionLL = new Vector3( |
944 | Convert.ToSingle(row["SitTargetOffsetX"]), | 944 | Convert.ToSingle(row["SitTargetOffsetX"]), |
945 | Convert.ToSingle(row["SitTargetOffsetY"]), | 945 | Convert.ToSingle(row["SitTargetOffsetY"]), |
946 | Convert.ToSingle(row["SitTargetOffsetZ"])); | 946 | Convert.ToSingle(row["SitTargetOffsetZ"])); |
947 | prim.SitTargetOrientationLL = new LLQuaternion( | 947 | prim.SitTargetOrientationLL = new Quaternion( |
948 | Convert.ToSingle( | 948 | Convert.ToSingle( |
949 | row["SitTargetOrientX"]), | 949 | row["SitTargetOrientX"]), |
950 | Convert.ToSingle( | 950 | Convert.ToSingle( |
@@ -993,10 +993,10 @@ namespace OpenSim.Data.SQLite | |||
993 | { | 993 | { |
994 | TaskInventoryItem taskItem = new TaskInventoryItem(); | 994 | TaskInventoryItem taskItem = new TaskInventoryItem(); |
995 | 995 | ||
996 | taskItem.ItemID = new LLUUID((String)row["itemID"]); | 996 | taskItem.ItemID = new UUID((String)row["itemID"]); |
997 | taskItem.ParentPartID = new LLUUID((String)row["primID"]); | 997 | taskItem.ParentPartID = new UUID((String)row["primID"]); |
998 | taskItem.AssetID = new LLUUID((String)row["assetID"]); | 998 | taskItem.AssetID = new UUID((String)row["assetID"]); |
999 | taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); | 999 | taskItem.ParentID = new UUID((String)row["parentFolderID"]); |
1000 | 1000 | ||
1001 | taskItem.InvType = Convert.ToInt32(row["invType"]); | 1001 | taskItem.InvType = Convert.ToInt32(row["invType"]); |
1002 | taskItem.Type = Convert.ToInt32(row["assetType"]); | 1002 | taskItem.Type = Convert.ToInt32(row["assetType"]); |
@@ -1004,10 +1004,10 @@ namespace OpenSim.Data.SQLite | |||
1004 | taskItem.Name = (String)row["name"]; | 1004 | taskItem.Name = (String)row["name"]; |
1005 | taskItem.Description = (String)row["description"]; | 1005 | taskItem.Description = (String)row["description"]; |
1006 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); | 1006 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); |
1007 | taskItem.CreatorID = new LLUUID((String)row["creatorID"]); | 1007 | taskItem.CreatorID = new UUID((String)row["creatorID"]); |
1008 | taskItem.OwnerID = new LLUUID((String)row["ownerID"]); | 1008 | taskItem.OwnerID = new UUID((String)row["ownerID"]); |
1009 | taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); | 1009 | taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]); |
1010 | taskItem.GroupID = new LLUUID((String)row["groupID"]); | 1010 | taskItem.GroupID = new UUID((String)row["groupID"]); |
1011 | 1011 | ||
1012 | taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]); | 1012 | taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]); |
1013 | taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]); | 1013 | taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]); |
@@ -1028,7 +1028,7 @@ namespace OpenSim.Data.SQLite | |||
1028 | { | 1028 | { |
1029 | LandData newData = new LandData(); | 1029 | LandData newData = new LandData(); |
1030 | 1030 | ||
1031 | newData.GlobalID = new LLUUID((String) row["UUID"]); | 1031 | newData.GlobalID = new UUID((String) row["UUID"]); |
1032 | newData.LocalID = Convert.ToInt32(row["LocalLandID"]); | 1032 | newData.LocalID = Convert.ToInt32(row["LocalLandID"]); |
1033 | 1033 | ||
1034 | // Bitmap is a byte[512] | 1034 | // Bitmap is a byte[512] |
@@ -1041,17 +1041,17 @@ namespace OpenSim.Data.SQLite | |||
1041 | newData.Area = Convert.ToInt32(row["Area"]); | 1041 | newData.Area = Convert.ToInt32(row["Area"]); |
1042 | newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented | 1042 | newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented |
1043 | newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]); | 1043 | newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]); |
1044 | //Enum libsecondlife.Parcel.ParcelCategory | 1044 | //Enum OpenMetaverse.Parcel.ParcelCategory |
1045 | newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); | 1045 | newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); |
1046 | newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); | 1046 | newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); |
1047 | newData.GroupID = new LLUUID((String) row["GroupUUID"]); | 1047 | newData.GroupID = new UUID((String) row["GroupUUID"]); |
1048 | newData.SalePrice = Convert.ToInt32(row["SalePrice"]); | 1048 | newData.SalePrice = Convert.ToInt32(row["SalePrice"]); |
1049 | newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]); | 1049 | newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]); |
1050 | //Enum. libsecondlife.Parcel.ParcelStatus | 1050 | //Enum. OpenMetaverse.Parcel.ParcelStatus |
1051 | newData.Flags = Convert.ToUInt32(row["LandFlags"]); | 1051 | newData.Flags = Convert.ToUInt32(row["LandFlags"]); |
1052 | newData.LandingType = (Byte) row["LandingType"]; | 1052 | newData.LandingType = (Byte) row["LandingType"]; |
1053 | newData.MediaAutoScale = (Byte) row["MediaAutoScale"]; | 1053 | newData.MediaAutoScale = (Byte) row["MediaAutoScale"]; |
1054 | newData.MediaID = new LLUUID((String) row["MediaTextureUUID"]); | 1054 | newData.MediaID = new UUID((String) row["MediaTextureUUID"]); |
1055 | newData.MediaURL = (String) row["MediaURL"]; | 1055 | newData.MediaURL = (String) row["MediaURL"]; |
1056 | newData.MusicURL = (String) row["MusicURL"]; | 1056 | newData.MusicURL = (String) row["MusicURL"]; |
1057 | newData.PassHours = Convert.ToSingle(row["PassHours"]); | 1057 | newData.PassHours = Convert.ToSingle(row["PassHours"]); |
@@ -1061,25 +1061,25 @@ namespace OpenSim.Data.SQLite | |||
1061 | { | 1061 | { |
1062 | 1062 | ||
1063 | newData.UserLocation = | 1063 | newData.UserLocation = |
1064 | new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), | 1064 | new Vector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), |
1065 | Convert.ToSingle(row["UserLocationZ"])); | 1065 | Convert.ToSingle(row["UserLocationZ"])); |
1066 | newData.UserLookAt = | 1066 | newData.UserLookAt = |
1067 | new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), | 1067 | new Vector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), |
1068 | Convert.ToSingle(row["UserLookAtZ"])); | 1068 | Convert.ToSingle(row["UserLookAtZ"])); |
1069 | 1069 | ||
1070 | } | 1070 | } |
1071 | catch (InvalidCastException) | 1071 | catch (InvalidCastException) |
1072 | { | 1072 | { |
1073 | m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); | 1073 | m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); |
1074 | newData.UserLocation = LLVector3.Zero; | 1074 | newData.UserLocation = Vector3.Zero; |
1075 | newData.UserLookAt = LLVector3.Zero; | 1075 | newData.UserLookAt = Vector3.Zero; |
1076 | } | 1076 | } |
1077 | newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); | 1077 | newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); |
1078 | LLUUID authBuyerID = LLUUID.Zero; | 1078 | UUID authBuyerID = UUID.Zero; |
1079 | 1079 | ||
1080 | try | 1080 | try |
1081 | { | 1081 | { |
1082 | Helpers.TryParse((string)row["AuthbuyerID"], out authBuyerID); | 1082 | UUID.TryParse((string)row["AuthbuyerID"], out authBuyerID); |
1083 | } | 1083 | } |
1084 | catch (InvalidCastException) | 1084 | catch (InvalidCastException) |
1085 | { | 1085 | { |
@@ -1120,7 +1120,7 @@ namespace OpenSim.Data.SQLite | |||
1120 | private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) | 1120 | private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) |
1121 | { | 1121 | { |
1122 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); | 1122 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); |
1123 | entry.AgentID = new LLUUID((string) row["AccessUUID"]); | 1123 | entry.AgentID = new UUID((string) row["AccessUUID"]); |
1124 | entry.Flags = (ParcelManager.AccessList) row["Flags"]; | 1124 | entry.Flags = (ParcelManager.AccessList) row["Flags"]; |
1125 | entry.Time = new DateTime(); | 1125 | entry.Time = new DateTime(); |
1126 | return entry; | 1126 | return entry; |
@@ -1144,7 +1144,7 @@ namespace OpenSim.Data.SQLite | |||
1144 | return str.ToArray(); | 1144 | return str.ToArray(); |
1145 | } | 1145 | } |
1146 | 1146 | ||
1147 | // private void fillTerrainRow(DataRow row, LLUUID regionUUID, int rev, double[,] val) | 1147 | // private void fillTerrainRow(DataRow row, UUID regionUUID, int rev, double[,] val) |
1148 | // { | 1148 | // { |
1149 | // row["RegionUUID"] = regionUUID; | 1149 | // row["RegionUUID"] = regionUUID; |
1150 | // row["Revision"] = rev; | 1150 | // row["Revision"] = rev; |
@@ -1167,7 +1167,7 @@ namespace OpenSim.Data.SQLite | |||
1167 | /// <param name="prim"></param> | 1167 | /// <param name="prim"></param> |
1168 | /// <param name="sceneGroupID"></param> | 1168 | /// <param name="sceneGroupID"></param> |
1169 | /// <param name="regionUUID"></param> | 1169 | /// <param name="regionUUID"></param> |
1170 | private static void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) | 1170 | private static void fillPrimRow(DataRow row, SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID) |
1171 | { | 1171 | { |
1172 | row["UUID"] = Util.ToRawUuidString(prim.UUID); | 1172 | row["UUID"] = Util.ToRawUuidString(prim.UUID); |
1173 | row["RegionUUID"] = Util.ToRawUuidString(regionUUID); | 1173 | row["RegionUUID"] = Util.ToRawUuidString(regionUUID); |
@@ -1215,12 +1215,12 @@ namespace OpenSim.Data.SQLite | |||
1215 | row["RotationW"] = prim.RotationOffset.W; | 1215 | row["RotationW"] = prim.RotationOffset.W; |
1216 | 1216 | ||
1217 | // Sit target | 1217 | // Sit target |
1218 | LLVector3 sitTargetPos = prim.SitTargetPositionLL; | 1218 | Vector3 sitTargetPos = prim.SitTargetPositionLL; |
1219 | row["SitTargetOffsetX"] = sitTargetPos.X; | 1219 | row["SitTargetOffsetX"] = sitTargetPos.X; |
1220 | row["SitTargetOffsetY"] = sitTargetPos.Y; | 1220 | row["SitTargetOffsetY"] = sitTargetPos.Y; |
1221 | row["SitTargetOffsetZ"] = sitTargetPos.Z; | 1221 | row["SitTargetOffsetZ"] = sitTargetPos.Z; |
1222 | 1222 | ||
1223 | LLQuaternion sitTargetOrient = prim.SitTargetOrientationLL; | 1223 | Quaternion sitTargetOrient = prim.SitTargetOrientationLL; |
1224 | row["SitTargetOrientW"] = sitTargetOrient.W; | 1224 | row["SitTargetOrientW"] = sitTargetOrient.W; |
1225 | row["SitTargetOrientX"] = sitTargetOrient.X; | 1225 | row["SitTargetOrientX"] = sitTargetOrient.X; |
1226 | row["SitTargetOrientY"] = sitTargetOrient.Y; | 1226 | row["SitTargetOrientY"] = sitTargetOrient.Y; |
@@ -1263,7 +1263,7 @@ namespace OpenSim.Data.SQLite | |||
1263 | /// <param name="row"></param> | 1263 | /// <param name="row"></param> |
1264 | /// <param name="land"></param> | 1264 | /// <param name="land"></param> |
1265 | /// <param name="regionUUID"></param> | 1265 | /// <param name="regionUUID"></param> |
1266 | private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) | 1266 | private static void fillLandRow(DataRow row, LandData land, UUID regionUUID) |
1267 | { | 1267 | { |
1268 | row["UUID"] = Util.ToRawUuidString(land.GlobalID); | 1268 | row["UUID"] = Util.ToRawUuidString(land.GlobalID); |
1269 | row["RegionUUID"] = Util.ToRawUuidString(regionUUID); | 1269 | row["RegionUUID"] = Util.ToRawUuidString(regionUUID); |
@@ -1278,12 +1278,12 @@ namespace OpenSim.Data.SQLite | |||
1278 | row["IsGroupOwned"] = land.IsGroupOwned; | 1278 | row["IsGroupOwned"] = land.IsGroupOwned; |
1279 | row["Area"] = land.Area; | 1279 | row["Area"] = land.Area; |
1280 | row["AuctionID"] = land.AuctionID; //Unemplemented | 1280 | row["AuctionID"] = land.AuctionID; //Unemplemented |
1281 | row["Category"] = land.Category; //Enum libsecondlife.Parcel.ParcelCategory | 1281 | row["Category"] = land.Category; //Enum OpenMetaverse.Parcel.ParcelCategory |
1282 | row["ClaimDate"] = land.ClaimDate; | 1282 | row["ClaimDate"] = land.ClaimDate; |
1283 | row["ClaimPrice"] = land.ClaimPrice; | 1283 | row["ClaimPrice"] = land.ClaimPrice; |
1284 | row["GroupUUID"] = Util.ToRawUuidString(land.GroupID); | 1284 | row["GroupUUID"] = Util.ToRawUuidString(land.GroupID); |
1285 | row["SalePrice"] = land.SalePrice; | 1285 | row["SalePrice"] = land.SalePrice; |
1286 | row["LandStatus"] = land.Status; //Enum. libsecondlife.Parcel.ParcelStatus | 1286 | row["LandStatus"] = land.Status; //Enum. OpenMetaverse.Parcel.ParcelStatus |
1287 | row["LandFlags"] = land.Flags; | 1287 | row["LandFlags"] = land.Flags; |
1288 | row["LandingType"] = land.LandingType; | 1288 | row["LandingType"] = land.LandingType; |
1289 | row["MediaAutoScale"] = land.MediaAutoScale; | 1289 | row["MediaAutoScale"] = land.MediaAutoScale; |
@@ -1308,7 +1308,7 @@ namespace OpenSim.Data.SQLite | |||
1308 | /// <param name="row"></param> | 1308 | /// <param name="row"></param> |
1309 | /// <param name="entry"></param> | 1309 | /// <param name="entry"></param> |
1310 | /// <param name="parcelID"></param> | 1310 | /// <param name="parcelID"></param> |
1311 | private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) | 1311 | private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, UUID parcelID) |
1312 | { | 1312 | { |
1313 | row["LandUUID"] = Util.ToRawUuidString(parcelID); | 1313 | row["LandUUID"] = Util.ToRawUuidString(parcelID); |
1314 | row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID); | 1314 | row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID); |
@@ -1323,7 +1323,7 @@ namespace OpenSim.Data.SQLite | |||
1323 | private PrimitiveBaseShape buildShape(DataRow row) | 1323 | private PrimitiveBaseShape buildShape(DataRow row) |
1324 | { | 1324 | { |
1325 | PrimitiveBaseShape s = new PrimitiveBaseShape(); | 1325 | PrimitiveBaseShape s = new PrimitiveBaseShape(); |
1326 | s.Scale = new LLVector3( | 1326 | s.Scale = new Vector3( |
1327 | Convert.ToSingle(row["ScaleX"]), | 1327 | Convert.ToSingle(row["ScaleX"]), |
1328 | Convert.ToSingle(row["ScaleY"]), | 1328 | Convert.ToSingle(row["ScaleY"]), |
1329 | Convert.ToSingle(row["ScaleZ"]) | 1329 | Convert.ToSingle(row["ScaleZ"]) |
@@ -1418,7 +1418,7 @@ namespace OpenSim.Data.SQLite | |||
1418 | /// <param name="prim"></param> | 1418 | /// <param name="prim"></param> |
1419 | /// <param name="sceneGroupID"></param> | 1419 | /// <param name="sceneGroupID"></param> |
1420 | /// <param name="regionUUID"></param> | 1420 | /// <param name="regionUUID"></param> |
1421 | private void addPrim(SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) | 1421 | private void addPrim(SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID) |
1422 | { | 1422 | { |
1423 | DataTable prims = ds.Tables["prims"]; | 1423 | DataTable prims = ds.Tables["prims"]; |
1424 | DataTable shapes = ds.Tables["primshapes"]; | 1424 | DataTable shapes = ds.Tables["primshapes"]; |
@@ -1453,7 +1453,7 @@ namespace OpenSim.Data.SQLite | |||
1453 | /// </summary> | 1453 | /// </summary> |
1454 | /// <param name="primID"></param> | 1454 | /// <param name="primID"></param> |
1455 | /// <param name="items"></param> | 1455 | /// <param name="items"></param> |
1456 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) | 1456 | public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items) |
1457 | { | 1457 | { |
1458 | m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID); | 1458 | m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID); |
1459 | 1459 | ||