aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLRegionData.cs
diff options
context:
space:
mode:
authorDiva Canto2009-08-17 05:55:38 -0700
committerDiva Canto2009-08-17 05:55:38 -0700
commitfa8a94577a2f38145da0c8a1f6d1c72c4f339ed9 (patch)
tree7bee741b06e6732fae848bef3c6b7f808ab3349a /OpenSim/Data/MySQL/MySQLRegionData.cs
parentBumped up grid services interface number. (diff)
parentAdd System.Xml reference to the console project (diff)
downloadopensim-SC-fa8a94577a2f38145da0c8a1f6d1c72c4f339ed9.zip
opensim-SC-fa8a94577a2f38145da0c8a1f6d1c72c4f339ed9.tar.gz
opensim-SC-fa8a94577a2f38145da0c8a1f6d1c72c4f339ed9.tar.bz2
opensim-SC-fa8a94577a2f38145da0c8a1f6d1c72c4f339ed9.tar.xz
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLRegionData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLRegionData.cs17
1 files changed, 10 insertions, 7 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs
index 2166845..9c2ee4a 100644
--- a/OpenSim/Data/MySQL/MySQLRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -834,7 +834,10 @@ namespace OpenSim.Data.MySQL
834 // explicit conversion of integers is required, which sort 834 // explicit conversion of integers is required, which sort
835 // of sucks. No idea if there is a shortcut here or not. 835 // of sucks. No idea if there is a shortcut here or not.
836 prim.CreationDate = Convert.ToInt32(row["CreationDate"]); 836 prim.CreationDate = Convert.ToInt32(row["CreationDate"]);
837 prim.Name = (String) row["Name"]; 837 if (row["Name"] != DBNull.Value)
838 prim.Name = (String)row["Name"];
839 else
840 prim.Name = string.Empty;
838 // various text fields 841 // various text fields
839 prim.Text = (String) row["Text"]; 842 prim.Text = (String) row["Text"];
840 prim.Color = Color.FromArgb(Convert.ToInt32(row["ColorA"]), 843 prim.Color = Color.FromArgb(Convert.ToInt32(row["ColorA"]),
@@ -945,12 +948,12 @@ namespace OpenSim.Data.MySQL
945 prim.DIE_AT_EDGE = true; 948 prim.DIE_AT_EDGE = true;
946 949
947 prim.SalePrice = Convert.ToInt32(row["SalePrice"]); 950 prim.SalePrice = Convert.ToInt32(row["SalePrice"]);
948 prim.ObjectSaleType = Convert.ToByte(row["SaleType"]); 951 prim.ObjectSaleType = unchecked((byte)Convert.ToSByte(row["SaleType"]));
949 952
950 prim.Material = Convert.ToByte(row["Material"]); 953 prim.Material = unchecked((byte)Convert.ToSByte(row["Material"]));
951 954
952 if (!(row["ClickAction"] is DBNull)) 955 if (!(row["ClickAction"] is DBNull))
953 prim.ClickAction = (byte)Convert.ToByte(row["ClickAction"]); 956 prim.ClickAction = unchecked((byte)Convert.ToSByte(row["ClickAction"]));
954 957
955 prim.CollisionSound = new UUID(row["CollisionSound"].ToString()); 958 prim.CollisionSound = new UUID(row["CollisionSound"].ToString());
956 prim.CollisionSoundVolume = Convert.ToSingle(row["CollisionSoundVolume"]); 959 prim.CollisionSoundVolume = Convert.ToSingle(row["CollisionSoundVolume"]);
@@ -1277,12 +1280,12 @@ namespace OpenSim.Data.MySQL
1277 cmd.Parameters.AddWithValue("DieAtEdge", 0); 1280 cmd.Parameters.AddWithValue("DieAtEdge", 0);
1278 1281
1279 cmd.Parameters.AddWithValue("SalePrice", prim.SalePrice); 1282 cmd.Parameters.AddWithValue("SalePrice", prim.SalePrice);
1280 cmd.Parameters.AddWithValue("SaleType", Convert.ToInt16(prim.ObjectSaleType)); 1283 cmd.Parameters.AddWithValue("SaleType", unchecked((sbyte)(prim.ObjectSaleType)));
1281 1284
1282 byte clickAction = prim.ClickAction; 1285 byte clickAction = prim.ClickAction;
1283 cmd.Parameters.AddWithValue("ClickAction", clickAction); 1286 cmd.Parameters.AddWithValue("ClickAction", unchecked((sbyte)(clickAction)));
1284 1287
1285 cmd.Parameters.AddWithValue("Material", prim.Material); 1288 cmd.Parameters.AddWithValue("Material", unchecked((sbyte)(prim.Material)));
1286 1289
1287 cmd.Parameters.AddWithValue("CollisionSound", prim.CollisionSound.ToString()); 1290 cmd.Parameters.AddWithValue("CollisionSound", prim.CollisionSound.ToString());
1288 cmd.Parameters.AddWithValue("CollisionSoundVolume", prim.CollisionSoundVolume); 1291 cmd.Parameters.AddWithValue("CollisionSoundVolume", prim.CollisionSoundVolume);