diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 138 |
1 files changed, 69 insertions, 69 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index 903f022..9552ba1 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.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 MySql.Data.MySqlClient; | 36 | using MySql.Data.MySqlClient; |
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
@@ -296,15 +296,15 @@ namespace OpenSim.Data.MySQL | |||
296 | /// </summary> | 296 | /// </summary> |
297 | /// <param name="obj">The object</param> | 297 | /// <param name="obj">The object</param> |
298 | /// <param name="regionUUID">The region UUID</param> | 298 | /// <param name="regionUUID">The region UUID</param> |
299 | public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) | 299 | public void StoreObject(SceneObjectGroup obj, UUID regionUUID) |
300 | { | 300 | { |
301 | lock (m_dataSet) | 301 | lock (m_dataSet) |
302 | { | 302 | { |
303 | foreach (SceneObjectPart prim in obj.Children.Values) | 303 | foreach (SceneObjectPart prim in obj.Children.Values) |
304 | { | 304 | { |
305 | if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0 | 305 | if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == 0 |
306 | && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0 | 306 | && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0 |
307 | && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0) | 307 | && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0) |
308 | { | 308 | { |
309 | //m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); | 309 | //m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); |
310 | addPrim(prim, obj.UUID, regionUUID); | 310 | addPrim(prim, obj.UUID, regionUUID); |
@@ -323,9 +323,9 @@ namespace OpenSim.Data.MySQL | |||
323 | /// </summary> | 323 | /// </summary> |
324 | /// <param name="obj">The object</param> | 324 | /// <param name="obj">The object</param> |
325 | /// <param name="regionUUID">The Region UUID</param> | 325 | /// <param name="regionUUID">The Region UUID</param> |
326 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) | 326 | public void RemoveObject(UUID obj, UUID regionUUID) |
327 | { | 327 | { |
328 | m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); | 328 | m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj, regionUUID); |
329 | 329 | ||
330 | DataTable prims = m_primTable; | 330 | DataTable prims = m_primTable; |
331 | DataTable shapes = m_shapeTable; | 331 | DataTable shapes = m_shapeTable; |
@@ -337,7 +337,7 @@ namespace OpenSim.Data.MySQL | |||
337 | foreach (DataRow row in primRows) | 337 | foreach (DataRow row in primRows) |
338 | { | 338 | { |
339 | // Remove shapes row | 339 | // Remove shapes row |
340 | LLUUID uuid = new LLUUID((string) row["UUID"]); | 340 | UUID uuid = new UUID((string) row["UUID"]); |
341 | DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(uuid)); | 341 | DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(uuid)); |
342 | if (shapeRow != null) | 342 | if (shapeRow != null) |
343 | { | 343 | { |
@@ -358,7 +358,7 @@ namespace OpenSim.Data.MySQL | |||
358 | /// The caller must acquire the necessrary synchronization locks and commit or rollback changes. | 358 | /// The caller must acquire the necessrary synchronization locks and commit or rollback changes. |
359 | /// </summary> | 359 | /// </summary> |
360 | /// <param name="uuid">the Item UUID</param> | 360 | /// <param name="uuid">the Item UUID</param> |
361 | private void RemoveItems(LLUUID uuid) | 361 | private void RemoveItems(UUID uuid) |
362 | { | 362 | { |
363 | String sql = String.Format("primID = '{0}'", uuid); | 363 | String sql = String.Format("primID = '{0}'", uuid); |
364 | DataRow[] itemRows = m_itemsTable.Select(sql); | 364 | DataRow[] itemRows = m_itemsTable.Select(sql); |
@@ -374,9 +374,9 @@ namespace OpenSim.Data.MySQL | |||
374 | /// </summary> | 374 | /// </summary> |
375 | /// <param name="regionUUID">the Region UUID</param> | 375 | /// <param name="regionUUID">the Region UUID</param> |
376 | /// <returns>List of loaded groups</returns> | 376 | /// <returns>List of loaded groups</returns> |
377 | public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) | 377 | public List<SceneObjectGroup> LoadObjects(UUID regionUUID) |
378 | { | 378 | { |
379 | Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>(); | 379 | Dictionary<UUID, SceneObjectGroup> createdObjects = new Dictionary<UUID, SceneObjectGroup>(); |
380 | 380 | ||
381 | List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); | 381 | List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); |
382 | 382 | ||
@@ -436,7 +436,7 @@ namespace OpenSim.Data.MySQL | |||
436 | "No shape found for prim in storage, so setting default box shape"); | 436 | "No shape found for prim in storage, so setting default box shape"); |
437 | prim.Shape = PrimitiveBaseShape.Default; | 437 | prim.Shape = PrimitiveBaseShape.Default; |
438 | } | 438 | } |
439 | createdObjects[new LLUUID(objID)].AddPart(prim); | 439 | createdObjects[new UUID(objID)].AddPart(prim); |
440 | } | 440 | } |
441 | 441 | ||
442 | LoadItems(prim); | 442 | LoadItems(prim); |
@@ -497,7 +497,7 @@ namespace OpenSim.Data.MySQL | |||
497 | /// </summary> | 497 | /// </summary> |
498 | /// <param name="ter">HeightField data</param> | 498 | /// <param name="ter">HeightField data</param> |
499 | /// <param name="regionID">region UUID</param> | 499 | /// <param name="regionID">region UUID</param> |
500 | public void StoreTerrain(double[,] ter, LLUUID regionID) | 500 | public void StoreTerrain(double[,] ter, UUID regionID) |
501 | { | 501 | { |
502 | int revision = 1; | 502 | int revision = 1; |
503 | m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString()); | 503 | m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString()); |
@@ -527,7 +527,7 @@ namespace OpenSim.Data.MySQL | |||
527 | /// </summary> | 527 | /// </summary> |
528 | /// <param name="regionID">the region UUID</param> | 528 | /// <param name="regionID">the region UUID</param> |
529 | /// <returns>Heightfield data</returns> | 529 | /// <returns>Heightfield data</returns> |
530 | public double[,] LoadTerrain(LLUUID regionID) | 530 | public double[,] LoadTerrain(UUID regionID) |
531 | { | 531 | { |
532 | double[,] terret = new double[256,256]; | 532 | double[,] terret = new double[256,256]; |
533 | terret.Initialize(); | 533 | terret.Initialize(); |
@@ -583,7 +583,7 @@ namespace OpenSim.Data.MySQL | |||
583 | /// </list> | 583 | /// </list> |
584 | /// </summary> | 584 | /// </summary> |
585 | /// <param name="globalID"></param> | 585 | /// <param name="globalID"></param> |
586 | public void RemoveLandObject(LLUUID globalID) | 586 | public void RemoveLandObject(UUID globalID) |
587 | { | 587 | { |
588 | lock (m_dataSet) | 588 | lock (m_dataSet) |
589 | { | 589 | { |
@@ -646,7 +646,7 @@ namespace OpenSim.Data.MySQL | |||
646 | } | 646 | } |
647 | } | 647 | } |
648 | 648 | ||
649 | public RegionSettings LoadRegionSettings(LLUUID regionUUID) | 649 | public RegionSettings LoadRegionSettings(UUID regionUUID) |
650 | { | 650 | { |
651 | lock (m_dataSet) | 651 | lock (m_dataSet) |
652 | { | 652 | { |
@@ -701,7 +701,7 @@ namespace OpenSim.Data.MySQL | |||
701 | /// </summary> | 701 | /// </summary> |
702 | /// <param name="regionUUID"></param> | 702 | /// <param name="regionUUID"></param> |
703 | /// <returns></returns> | 703 | /// <returns></returns> |
704 | public List<LandData> LoadLandObjects(LLUUID regionUUID) | 704 | public List<LandData> LoadLandObjects(UUID regionUUID) |
705 | { | 705 | { |
706 | List<LandData> landDataForRegion = new List<LandData>(); | 706 | List<LandData> landDataForRegion = new List<LandData>(); |
707 | lock (m_dataSet) | 707 | lock (m_dataSet) |
@@ -1101,7 +1101,7 @@ namespace OpenSim.Data.MySQL | |||
1101 | private SceneObjectPart buildPrim(DataRow row) | 1101 | private SceneObjectPart buildPrim(DataRow row) |
1102 | { | 1102 | { |
1103 | SceneObjectPart prim = new SceneObjectPart(); | 1103 | SceneObjectPart prim = new SceneObjectPart(); |
1104 | prim.UUID = new LLUUID((String) row["UUID"]); | 1104 | prim.UUID = new UUID((String) row["UUID"]); |
1105 | // explicit conversion of integers is required, which sort | 1105 | // explicit conversion of integers is required, which sort |
1106 | // of sucks. No idea if there is a shortcut here or not. | 1106 | // of sucks. No idea if there is a shortcut here or not. |
1107 | prim.ParentID = Convert.ToUInt32(row["ParentID"]); | 1107 | prim.ParentID = Convert.ToUInt32(row["ParentID"]); |
@@ -1114,54 +1114,54 @@ namespace OpenSim.Data.MySQL | |||
1114 | prim.TouchName = (String) row["TouchName"]; | 1114 | prim.TouchName = (String) row["TouchName"]; |
1115 | // permissions | 1115 | // permissions |
1116 | prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); | 1116 | prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); |
1117 | prim.CreatorID = new LLUUID((String) row["CreatorID"]); | 1117 | prim.CreatorID = new UUID((String) row["CreatorID"]); |
1118 | prim.OwnerID = new LLUUID((String) row["OwnerID"]); | 1118 | prim.OwnerID = new UUID((String) row["OwnerID"]); |
1119 | prim.GroupID = new LLUUID((String) row["GroupID"]); | 1119 | prim.GroupID = new UUID((String) row["GroupID"]); |
1120 | prim.LastOwnerID = new LLUUID((String) row["LastOwnerID"]); | 1120 | prim.LastOwnerID = new UUID((String) row["LastOwnerID"]); |
1121 | prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]); | 1121 | prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]); |
1122 | prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]); | 1122 | prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]); |
1123 | prim.GroupMask = Convert.ToUInt32(row["GroupMask"]); | 1123 | prim.GroupMask = Convert.ToUInt32(row["GroupMask"]); |
1124 | prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]); | 1124 | prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]); |
1125 | prim.BaseMask = Convert.ToUInt32(row["BaseMask"]); | 1125 | prim.BaseMask = Convert.ToUInt32(row["BaseMask"]); |
1126 | // vectors | 1126 | // vectors |
1127 | prim.OffsetPosition = new LLVector3( | 1127 | prim.OffsetPosition = new Vector3( |
1128 | Convert.ToSingle(row["PositionX"]), | 1128 | Convert.ToSingle(row["PositionX"]), |
1129 | Convert.ToSingle(row["PositionY"]), | 1129 | Convert.ToSingle(row["PositionY"]), |
1130 | Convert.ToSingle(row["PositionZ"]) | 1130 | Convert.ToSingle(row["PositionZ"]) |
1131 | ); | 1131 | ); |
1132 | prim.GroupPosition = new LLVector3( | 1132 | prim.GroupPosition = new Vector3( |
1133 | Convert.ToSingle(row["GroupPositionX"]), | 1133 | Convert.ToSingle(row["GroupPositionX"]), |
1134 | Convert.ToSingle(row["GroupPositionY"]), | 1134 | Convert.ToSingle(row["GroupPositionY"]), |
1135 | Convert.ToSingle(row["GroupPositionZ"]) | 1135 | Convert.ToSingle(row["GroupPositionZ"]) |
1136 | ); | 1136 | ); |
1137 | prim.Velocity = new LLVector3( | 1137 | prim.Velocity = new Vector3( |
1138 | Convert.ToSingle(row["VelocityX"]), | 1138 | Convert.ToSingle(row["VelocityX"]), |
1139 | Convert.ToSingle(row["VelocityY"]), | 1139 | Convert.ToSingle(row["VelocityY"]), |
1140 | Convert.ToSingle(row["VelocityZ"]) | 1140 | Convert.ToSingle(row["VelocityZ"]) |
1141 | ); | 1141 | ); |
1142 | prim.AngularVelocity = new LLVector3( | 1142 | prim.AngularVelocity = new Vector3( |
1143 | Convert.ToSingle(row["AngularVelocityX"]), | 1143 | Convert.ToSingle(row["AngularVelocityX"]), |
1144 | Convert.ToSingle(row["AngularVelocityY"]), | 1144 | Convert.ToSingle(row["AngularVelocityY"]), |
1145 | Convert.ToSingle(row["AngularVelocityZ"]) | 1145 | Convert.ToSingle(row["AngularVelocityZ"]) |
1146 | ); | 1146 | ); |
1147 | prim.Acceleration = new LLVector3( | 1147 | prim.Acceleration = new Vector3( |
1148 | Convert.ToSingle(row["AccelerationX"]), | 1148 | Convert.ToSingle(row["AccelerationX"]), |
1149 | Convert.ToSingle(row["AccelerationY"]), | 1149 | Convert.ToSingle(row["AccelerationY"]), |
1150 | Convert.ToSingle(row["AccelerationZ"]) | 1150 | Convert.ToSingle(row["AccelerationZ"]) |
1151 | ); | 1151 | ); |
1152 | // quaternions | 1152 | // quaternions |
1153 | prim.RotationOffset = new LLQuaternion( | 1153 | prim.RotationOffset = new Quaternion( |
1154 | Convert.ToSingle(row["RotationX"]), | 1154 | Convert.ToSingle(row["RotationX"]), |
1155 | Convert.ToSingle(row["RotationY"]), | 1155 | Convert.ToSingle(row["RotationY"]), |
1156 | Convert.ToSingle(row["RotationZ"]), | 1156 | Convert.ToSingle(row["RotationZ"]), |
1157 | Convert.ToSingle(row["RotationW"]) | 1157 | Convert.ToSingle(row["RotationW"]) |
1158 | ); | 1158 | ); |
1159 | prim.SitTargetPositionLL = new LLVector3( | 1159 | prim.SitTargetPositionLL = new Vector3( |
1160 | Convert.ToSingle(row["SitTargetOffsetX"]), | 1160 | Convert.ToSingle(row["SitTargetOffsetX"]), |
1161 | Convert.ToSingle(row["SitTargetOffsetY"]), | 1161 | Convert.ToSingle(row["SitTargetOffsetY"]), |
1162 | Convert.ToSingle(row["SitTargetOffsetZ"]) | 1162 | Convert.ToSingle(row["SitTargetOffsetZ"]) |
1163 | ); | 1163 | ); |
1164 | prim.SitTargetOrientationLL = new LLQuaternion( | 1164 | prim.SitTargetOrientationLL = new Quaternion( |
1165 | Convert.ToSingle(row["SitTargetOrientX"]), | 1165 | Convert.ToSingle(row["SitTargetOrientX"]), |
1166 | Convert.ToSingle(row["SitTargetOrientY"]), | 1166 | Convert.ToSingle(row["SitTargetOrientY"]), |
1167 | Convert.ToSingle(row["SitTargetOrientZ"]), | 1167 | Convert.ToSingle(row["SitTargetOrientZ"]), |
@@ -1174,14 +1174,14 @@ namespace OpenSim.Data.MySQL | |||
1174 | prim.PayPrice[3] = Convert.ToInt32(row["PayButton3"]); | 1174 | prim.PayPrice[3] = Convert.ToInt32(row["PayButton3"]); |
1175 | prim.PayPrice[4] = Convert.ToInt32(row["PayButton4"]); | 1175 | prim.PayPrice[4] = Convert.ToInt32(row["PayButton4"]); |
1176 | 1176 | ||
1177 | prim.Sound = new LLUUID(row["LoopedSound"].ToString()); | 1177 | prim.Sound = new UUID(row["LoopedSound"].ToString()); |
1178 | prim.SoundGain = Convert.ToSingle(row["LoopedSoundGain"]); | 1178 | prim.SoundGain = Convert.ToSingle(row["LoopedSoundGain"]); |
1179 | prim.SoundFlags = 1; // If it's persisted at all, it's looped | 1179 | prim.SoundFlags = 1; // If it's persisted at all, it's looped |
1180 | 1180 | ||
1181 | if (!row.IsNull("TextureAnimation")) | 1181 | if (!row.IsNull("TextureAnimation")) |
1182 | prim.TextureAnimation = (Byte[])row["TextureAnimation"]; | 1182 | prim.TextureAnimation = (Byte[])row["TextureAnimation"]; |
1183 | 1183 | ||
1184 | prim.RotationalVelocity = new LLVector3( | 1184 | prim.RotationalVelocity = new Vector3( |
1185 | Convert.ToSingle(row["OmegaX"]), | 1185 | Convert.ToSingle(row["OmegaX"]), |
1186 | Convert.ToSingle(row["OmegaY"]), | 1186 | Convert.ToSingle(row["OmegaY"]), |
1187 | Convert.ToSingle(row["OmegaZ"]) | 1187 | Convert.ToSingle(row["OmegaZ"]) |
@@ -1190,13 +1190,13 @@ namespace OpenSim.Data.MySQL | |||
1190 | // TODO: Rotation | 1190 | // TODO: Rotation |
1191 | // OmegaX, OmegaY, OmegaZ | 1191 | // OmegaX, OmegaY, OmegaZ |
1192 | 1192 | ||
1193 | prim.SetCameraEyeOffset(new LLVector3( | 1193 | prim.SetCameraEyeOffset(new Vector3( |
1194 | Convert.ToSingle(row["CameraEyeOffsetX"]), | 1194 | Convert.ToSingle(row["CameraEyeOffsetX"]), |
1195 | Convert.ToSingle(row["CameraEyeOffsetY"]), | 1195 | Convert.ToSingle(row["CameraEyeOffsetY"]), |
1196 | Convert.ToSingle(row["CameraEyeOffsetZ"]) | 1196 | Convert.ToSingle(row["CameraEyeOffsetZ"]) |
1197 | )); | 1197 | )); |
1198 | 1198 | ||
1199 | prim.SetCameraAtOffset(new LLVector3( | 1199 | prim.SetCameraAtOffset(new Vector3( |
1200 | Convert.ToSingle(row["CameraAtOffsetX"]), | 1200 | Convert.ToSingle(row["CameraAtOffsetX"]), |
1201 | Convert.ToSingle(row["CameraAtOffsetY"]), | 1201 | Convert.ToSingle(row["CameraAtOffsetY"]), |
1202 | Convert.ToSingle(row["CameraAtOffsetZ"]) | 1202 | Convert.ToSingle(row["CameraAtOffsetZ"]) |
@@ -1229,10 +1229,10 @@ namespace OpenSim.Data.MySQL | |||
1229 | { | 1229 | { |
1230 | TaskInventoryItem taskItem = new TaskInventoryItem(); | 1230 | TaskInventoryItem taskItem = new TaskInventoryItem(); |
1231 | 1231 | ||
1232 | taskItem.ItemID = new LLUUID((String)row["itemID"]); | 1232 | taskItem.ItemID = new UUID((String)row["itemID"]); |
1233 | taskItem.ParentPartID = new LLUUID((String)row["primID"]); | 1233 | taskItem.ParentPartID = new UUID((String)row["primID"]); |
1234 | taskItem.AssetID = new LLUUID((String)row["assetID"]); | 1234 | taskItem.AssetID = new UUID((String)row["assetID"]); |
1235 | taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); | 1235 | taskItem.ParentID = new UUID((String)row["parentFolderID"]); |
1236 | 1236 | ||
1237 | taskItem.InvType = Convert.ToInt32(row["invType"]); | 1237 | taskItem.InvType = Convert.ToInt32(row["invType"]); |
1238 | taskItem.Type = Convert.ToInt32(row["assetType"]); | 1238 | taskItem.Type = Convert.ToInt32(row["assetType"]); |
@@ -1240,10 +1240,10 @@ namespace OpenSim.Data.MySQL | |||
1240 | taskItem.Name = (String)row["name"]; | 1240 | taskItem.Name = (String)row["name"]; |
1241 | taskItem.Description = (String)row["description"]; | 1241 | taskItem.Description = (String)row["description"]; |
1242 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); | 1242 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); |
1243 | taskItem.CreatorID = new LLUUID((String)row["creatorID"]); | 1243 | taskItem.CreatorID = new UUID((String)row["creatorID"]); |
1244 | taskItem.OwnerID = new LLUUID((String)row["ownerID"]); | 1244 | taskItem.OwnerID = new UUID((String)row["ownerID"]); |
1245 | taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); | 1245 | taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]); |
1246 | taskItem.GroupID = new LLUUID((String)row["groupID"]); | 1246 | taskItem.GroupID = new UUID((String)row["groupID"]); |
1247 | 1247 | ||
1248 | taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]); | 1248 | taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]); |
1249 | taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]); | 1249 | taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]); |
@@ -1259,7 +1259,7 @@ namespace OpenSim.Data.MySQL | |||
1259 | { | 1259 | { |
1260 | RegionSettings newSettings = new RegionSettings(); | 1260 | RegionSettings newSettings = new RegionSettings(); |
1261 | 1261 | ||
1262 | newSettings.RegionUUID = new LLUUID((string) row["regionUUID"]); | 1262 | newSettings.RegionUUID = new UUID((string) row["regionUUID"]); |
1263 | newSettings.BlockTerraform = Convert.ToBoolean(row["block_terraform"]); | 1263 | newSettings.BlockTerraform = Convert.ToBoolean(row["block_terraform"]); |
1264 | newSettings.AllowDamage = Convert.ToBoolean(row["allow_damage"]); | 1264 | newSettings.AllowDamage = Convert.ToBoolean(row["allow_damage"]); |
1265 | newSettings.BlockFly = Convert.ToBoolean(row["block_fly"]); | 1265 | newSettings.BlockFly = Convert.ToBoolean(row["block_fly"]); |
@@ -1273,10 +1273,10 @@ namespace OpenSim.Data.MySQL | |||
1273 | newSettings.DisableScripts = Convert.ToBoolean(row["disable_scripts"]); | 1273 | newSettings.DisableScripts = Convert.ToBoolean(row["disable_scripts"]); |
1274 | newSettings.DisableCollisions = Convert.ToBoolean(row["disable_collisions"]); | 1274 | newSettings.DisableCollisions = Convert.ToBoolean(row["disable_collisions"]); |
1275 | newSettings.DisablePhysics = Convert.ToBoolean(row["disable_physics"]); | 1275 | newSettings.DisablePhysics = Convert.ToBoolean(row["disable_physics"]); |
1276 | newSettings.TerrainTexture1 = new LLUUID((String) row["terrain_texture_1"]); | 1276 | newSettings.TerrainTexture1 = new UUID((String) row["terrain_texture_1"]); |
1277 | newSettings.TerrainTexture2 = new LLUUID((String) row["terrain_texture_2"]); | 1277 | newSettings.TerrainTexture2 = new UUID((String) row["terrain_texture_2"]); |
1278 | newSettings.TerrainTexture3 = new LLUUID((String) row["terrain_texture_3"]); | 1278 | newSettings.TerrainTexture3 = new UUID((String) row["terrain_texture_3"]); |
1279 | newSettings.TerrainTexture4 = new LLUUID((String) row["terrain_texture_4"]); | 1279 | newSettings.TerrainTexture4 = new UUID((String) row["terrain_texture_4"]); |
1280 | newSettings.Elevation1NW = Convert.ToDouble(row["elevation_1_nw"]); | 1280 | newSettings.Elevation1NW = Convert.ToDouble(row["elevation_1_nw"]); |
1281 | newSettings.Elevation2NW = Convert.ToDouble(row["elevation_2_nw"]); | 1281 | newSettings.Elevation2NW = Convert.ToDouble(row["elevation_2_nw"]); |
1282 | newSettings.Elevation1NE = Convert.ToDouble(row["elevation_1_ne"]); | 1282 | newSettings.Elevation1NE = Convert.ToDouble(row["elevation_1_ne"]); |
@@ -1292,7 +1292,7 @@ namespace OpenSim.Data.MySQL | |||
1292 | newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]); | 1292 | newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]); |
1293 | newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); | 1293 | newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); |
1294 | newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); | 1294 | newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); |
1295 | newSettings.Covenant = new LLUUID((String) row["covenant"]); | 1295 | newSettings.Covenant = new UUID((String) row["covenant"]); |
1296 | 1296 | ||
1297 | return newSettings; | 1297 | return newSettings; |
1298 | } | 1298 | } |
@@ -1306,7 +1306,7 @@ namespace OpenSim.Data.MySQL | |||
1306 | { | 1306 | { |
1307 | LandData newData = new LandData(); | 1307 | LandData newData = new LandData(); |
1308 | 1308 | ||
1309 | newData.GlobalID = new LLUUID((String) row["UUID"]); | 1309 | newData.GlobalID = new UUID((String) row["UUID"]); |
1310 | newData.LocalID = Convert.ToInt32(row["LocalLandID"]); | 1310 | newData.LocalID = Convert.ToInt32(row["LocalLandID"]); |
1311 | 1311 | ||
1312 | // Bitmap is a byte[512] | 1312 | // Bitmap is a byte[512] |
@@ -1322,39 +1322,39 @@ namespace OpenSim.Data.MySQL | |||
1322 | //Enum libsecondlife.Parcel.ParcelCategory | 1322 | //Enum libsecondlife.Parcel.ParcelCategory |
1323 | newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); | 1323 | newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); |
1324 | newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); | 1324 | newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); |
1325 | newData.GroupID = new LLUUID((String) row["GroupUUID"]); | 1325 | newData.GroupID = new UUID((String) row["GroupUUID"]); |
1326 | newData.SalePrice = Convert.ToInt32(row["SalePrice"]); | 1326 | newData.SalePrice = Convert.ToInt32(row["SalePrice"]); |
1327 | newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]); | 1327 | newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]); |
1328 | //Enum. libsecondlife.Parcel.ParcelStatus | 1328 | //Enum. libsecondlife.Parcel.ParcelStatus |
1329 | newData.Flags = Convert.ToUInt32(row["LandFlags"]); | 1329 | newData.Flags = Convert.ToUInt32(row["LandFlags"]); |
1330 | newData.LandingType = Convert.ToByte(row["LandingType"]); | 1330 | newData.LandingType = Convert.ToByte(row["LandingType"]); |
1331 | newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]); | 1331 | newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]); |
1332 | newData.MediaID = new LLUUID((String) row["MediaTextureUUID"]); | 1332 | newData.MediaID = new UUID((String) row["MediaTextureUUID"]); |
1333 | newData.MediaURL = (String) row["MediaURL"]; | 1333 | newData.MediaURL = (String) row["MediaURL"]; |
1334 | newData.MusicURL = (String) row["MusicURL"]; | 1334 | newData.MusicURL = (String) row["MusicURL"]; |
1335 | newData.PassHours = Convert.ToSingle(row["PassHours"]); | 1335 | newData.PassHours = Convert.ToSingle(row["PassHours"]); |
1336 | newData.PassPrice = Convert.ToInt32(row["PassPrice"]); | 1336 | newData.PassPrice = Convert.ToInt32(row["PassPrice"]); |
1337 | LLUUID authedbuyer = LLUUID.Zero; | 1337 | UUID authedbuyer = UUID.Zero; |
1338 | LLUUID snapshotID = LLUUID.Zero; | 1338 | UUID snapshotID = UUID.Zero; |
1339 | 1339 | ||
1340 | Helpers.TryParse((string)row["AuthBuyerID"], out authedbuyer); | 1340 | UUID.TryParse((string)row["AuthBuyerID"], out authedbuyer); |
1341 | Helpers.TryParse((string)row["SnapshotUUID"], out snapshotID); | 1341 | UUID.TryParse((string)row["SnapshotUUID"], out snapshotID); |
1342 | 1342 | ||
1343 | newData.AuthBuyerID = authedbuyer; | 1343 | newData.AuthBuyerID = authedbuyer; |
1344 | newData.SnapshotID = snapshotID; | 1344 | newData.SnapshotID = snapshotID; |
1345 | try | 1345 | try |
1346 | { | 1346 | { |
1347 | newData.UserLocation = | 1347 | newData.UserLocation = |
1348 | new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), | 1348 | new Vector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), |
1349 | Convert.ToSingle(row["UserLocationZ"])); | 1349 | Convert.ToSingle(row["UserLocationZ"])); |
1350 | newData.UserLookAt = | 1350 | newData.UserLookAt = |
1351 | new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), | 1351 | new Vector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), |
1352 | Convert.ToSingle(row["UserLookAtZ"])); | 1352 | Convert.ToSingle(row["UserLookAtZ"])); |
1353 | } | 1353 | } |
1354 | catch (InvalidCastException) | 1354 | catch (InvalidCastException) |
1355 | { | 1355 | { |
1356 | newData.UserLocation = LLVector3.Zero; | 1356 | newData.UserLocation = Vector3.Zero; |
1357 | newData.UserLookAt = LLVector3.Zero; | 1357 | newData.UserLookAt = Vector3.Zero; |
1358 | m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); | 1358 | m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); |
1359 | } | 1359 | } |
1360 | 1360 | ||
@@ -1371,7 +1371,7 @@ namespace OpenSim.Data.MySQL | |||
1371 | private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) | 1371 | private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) |
1372 | { | 1372 | { |
1373 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); | 1373 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); |
1374 | entry.AgentID = new LLUUID((string) row["AccessUUID"]); | 1374 | entry.AgentID = new UUID((string) row["AccessUUID"]); |
1375 | entry.Flags = (ParcelManager.AccessList) Convert.ToInt32(row["Flags"]); | 1375 | entry.Flags = (ParcelManager.AccessList) Convert.ToInt32(row["Flags"]); |
1376 | entry.Time = new DateTime(); | 1376 | entry.Time = new DateTime(); |
1377 | return entry; | 1377 | return entry; |
@@ -1408,7 +1408,7 @@ namespace OpenSim.Data.MySQL | |||
1408 | /// <param name="prim"></param> | 1408 | /// <param name="prim"></param> |
1409 | /// <param name="sceneGroupID"></param> | 1409 | /// <param name="sceneGroupID"></param> |
1410 | /// <param name="regionUUID"></param> | 1410 | /// <param name="regionUUID"></param> |
1411 | private void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) | 1411 | private void fillPrimRow(DataRow row, SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID) |
1412 | { | 1412 | { |
1413 | row["UUID"] = Util.ToRawUuidString(prim.UUID); | 1413 | row["UUID"] = Util.ToRawUuidString(prim.UUID); |
1414 | row["RegionUUID"] = Util.ToRawUuidString(regionUUID); | 1414 | row["RegionUUID"] = Util.ToRawUuidString(regionUUID); |
@@ -1456,12 +1456,12 @@ namespace OpenSim.Data.MySQL | |||
1456 | row["RotationW"] = prim.RotationOffset.W; | 1456 | row["RotationW"] = prim.RotationOffset.W; |
1457 | 1457 | ||
1458 | // Sit target | 1458 | // Sit target |
1459 | LLVector3 sitTargetPos = prim.SitTargetPositionLL; | 1459 | Vector3 sitTargetPos = prim.SitTargetPositionLL; |
1460 | row["SitTargetOffsetX"] = sitTargetPos.X; | 1460 | row["SitTargetOffsetX"] = sitTargetPos.X; |
1461 | row["SitTargetOffsetY"] = sitTargetPos.Y; | 1461 | row["SitTargetOffsetY"] = sitTargetPos.Y; |
1462 | row["SitTargetOffsetZ"] = sitTargetPos.Z; | 1462 | row["SitTargetOffsetZ"] = sitTargetPos.Z; |
1463 | 1463 | ||
1464 | LLQuaternion sitTargetOrient = prim.SitTargetOrientationLL; | 1464 | Quaternion sitTargetOrient = prim.SitTargetOrientationLL; |
1465 | row["SitTargetOrientW"] = sitTargetOrient.W; | 1465 | row["SitTargetOrientW"] = sitTargetOrient.W; |
1466 | row["SitTargetOrientX"] = sitTargetOrient.X; | 1466 | row["SitTargetOrientX"] = sitTargetOrient.X; |
1467 | row["SitTargetOrientY"] = sitTargetOrient.Y; | 1467 | row["SitTargetOrientY"] = sitTargetOrient.Y; |
@@ -1480,7 +1480,7 @@ namespace OpenSim.Data.MySQL | |||
1480 | } | 1480 | } |
1481 | else | 1481 | else |
1482 | { | 1482 | { |
1483 | row["LoopedSound"] = LLUUID.Zero; | 1483 | row["LoopedSound"] = UUID.Zero; |
1484 | row["LoopedSoundGain"] = 0.0f; | 1484 | row["LoopedSoundGain"] = 0.0f; |
1485 | } | 1485 | } |
1486 | 1486 | ||
@@ -1597,7 +1597,7 @@ namespace OpenSim.Data.MySQL | |||
1597 | /// <param name="row"></param> | 1597 | /// <param name="row"></param> |
1598 | /// <param name="land"></param> | 1598 | /// <param name="land"></param> |
1599 | /// <param name="regionUUID"></param> | 1599 | /// <param name="regionUUID"></param> |
1600 | private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) | 1600 | private static void fillLandRow(DataRow row, LandData land, UUID regionUUID) |
1601 | { | 1601 | { |
1602 | row["UUID"] = Util.ToRawUuidString(land.GlobalID); | 1602 | row["UUID"] = Util.ToRawUuidString(land.GlobalID); |
1603 | row["RegionUUID"] = Util.ToRawUuidString(regionUUID); | 1603 | row["RegionUUID"] = Util.ToRawUuidString(regionUUID); |
@@ -1642,7 +1642,7 @@ namespace OpenSim.Data.MySQL | |||
1642 | /// <param name="row"></param> | 1642 | /// <param name="row"></param> |
1643 | /// <param name="entry"></param> | 1643 | /// <param name="entry"></param> |
1644 | /// <param name="parcelID"></param> | 1644 | /// <param name="parcelID"></param> |
1645 | private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) | 1645 | private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, UUID parcelID) |
1646 | { | 1646 | { |
1647 | row["LandUUID"] = Util.ToRawUuidString(parcelID); | 1647 | row["LandUUID"] = Util.ToRawUuidString(parcelID); |
1648 | row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID); | 1648 | row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID); |
@@ -1657,7 +1657,7 @@ namespace OpenSim.Data.MySQL | |||
1657 | private PrimitiveBaseShape buildShape(DataRow row) | 1657 | private PrimitiveBaseShape buildShape(DataRow row) |
1658 | { | 1658 | { |
1659 | PrimitiveBaseShape s = new PrimitiveBaseShape(); | 1659 | PrimitiveBaseShape s = new PrimitiveBaseShape(); |
1660 | s.Scale = new LLVector3( | 1660 | s.Scale = new Vector3( |
1661 | Convert.ToSingle(row["ScaleX"]), | 1661 | Convert.ToSingle(row["ScaleX"]), |
1662 | Convert.ToSingle(row["ScaleY"]), | 1662 | Convert.ToSingle(row["ScaleY"]), |
1663 | Convert.ToSingle(row["ScaleZ"]) | 1663 | Convert.ToSingle(row["ScaleZ"]) |
@@ -1778,7 +1778,7 @@ namespace OpenSim.Data.MySQL | |||
1778 | /// <param name="prim"></param> | 1778 | /// <param name="prim"></param> |
1779 | /// <param name="sceneGroupID"></param> | 1779 | /// <param name="sceneGroupID"></param> |
1780 | /// <param name="regionUUID"></param> | 1780 | /// <param name="regionUUID"></param> |
1781 | private void addPrim(SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) | 1781 | private void addPrim(SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID) |
1782 | { | 1782 | { |
1783 | lock (m_dataSet) | 1783 | lock (m_dataSet) |
1784 | { | 1784 | { |
@@ -1816,7 +1816,7 @@ namespace OpenSim.Data.MySQL | |||
1816 | /// </summary> | 1816 | /// </summary> |
1817 | /// <param name="primID"></param> | 1817 | /// <param name="primID"></param> |
1818 | /// <param name="items"></param> | 1818 | /// <param name="items"></param> |
1819 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) | 1819 | public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items) |
1820 | { | 1820 | { |
1821 | m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); | 1821 | m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); |
1822 | 1822 | ||