aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-01-11 14:55:27 +0000
committerJustin Clarke Casey2008-01-11 14:55:27 +0000
commit1e981a7c1cbf6abf1e60cf2ddc3ce9074d6543a6 (patch)
tree7de3586c0d4c7be06c2a6087ec8d8496cfb2f5d8 /OpenSim
parent* quick fix to fix if webLoginKey is null in DB, return random key (I guess L... (diff)
downloadopensim-SC_OLD-1e981a7c1cbf6abf1e60cf2ddc3ce9074d6543a6.zip
opensim-SC_OLD-1e981a7c1cbf6abf1e60cf2ddc3ce9074d6543a6.tar.gz
opensim-SC_OLD-1e981a7c1cbf6abf1e60cf2ddc3ce9074d6543a6.tar.bz2
opensim-SC_OLD-1e981a7c1cbf6abf1e60cf2ddc3ce9074d6543a6.tar.xz
Switch prim items type representation to use int rather than strings.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs8
-rw-r--r--OpenSim/Framework/TaskInventoryItem.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs19
-rw-r--r--OpenSim/Region/Environment/StorageManager.cs4
5 files changed, 17 insertions, 22 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs b/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs
index 00b0acb..96dd5ac 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs
@@ -690,8 +690,8 @@ namespace OpenSim.Framework.Data.SQLite
690 createCol(items, "assetID", typeof (String)); 690 createCol(items, "assetID", typeof (String));
691 createCol(items, "parentFolderID", typeof (String)); 691 createCol(items, "parentFolderID", typeof (String));
692 692
693 createCol(items, "invType", typeof (String)); 693 createCol(items, "invType", typeof (Int32));
694 createCol(items, "assetType", typeof (String)); 694 createCol(items, "assetType", typeof (Int32));
695 695
696 createCol(items, "name", typeof (String)); 696 createCol(items, "name", typeof (String));
697 createCol(items, "description", typeof (String)); 697 createCol(items, "description", typeof (String));
@@ -895,8 +895,8 @@ namespace OpenSim.Framework.Data.SQLite
895 taskItem.asset_id = new LLUUID((String)row["assetID"]); 895 taskItem.asset_id = new LLUUID((String)row["assetID"]);
896 taskItem.parent_id = new LLUUID((String)row["parentFolderID"]); 896 taskItem.parent_id = new LLUUID((String)row["parentFolderID"]);
897 897
898 taskItem.inv_type = (String)row["invType"]; 898 taskItem.inv_type = Convert.ToInt32(row["invType"]);
899 taskItem.type = (String)row["assetType"]; 899 taskItem.type = Convert.ToInt32(row["assetType"]);
900 900
901 taskItem.name = (String)row["name"]; 901 taskItem.name = (String)row["name"];
902 taskItem.desc = (String)row["description"]; 902 taskItem.desc = (String)row["description"];
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs
index e1eac79..196e096 100644
--- a/OpenSim/Framework/TaskInventoryItem.cs
+++ b/OpenSim/Framework/TaskInventoryItem.cs
@@ -89,8 +89,8 @@ namespace OpenSim.Framework
89 public LLUUID group_id = LLUUID.Zero; 89 public LLUUID group_id = LLUUID.Zero;
90 90
91 public LLUUID asset_id = LLUUID.Zero; 91 public LLUUID asset_id = LLUUID.Zero;
92 public string type = ""; 92 public int type = 0;
93 public string inv_type = ""; 93 public int inv_type = 0;
94 public uint flags = 0; 94 public uint flags = 0;
95 public string name = ""; 95 public string name = "";
96 public string desc = ""; 96 public string desc = "";
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
index 4d25b5d..b188fdd 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
@@ -175,8 +175,8 @@ namespace OpenSim.Region.Environment.Scenes
175 taskItem.desc = item.inventoryDescription; 175 taskItem.desc = item.inventoryDescription;
176 taskItem.owner_id = item.avatarID; 176 taskItem.owner_id = item.avatarID;
177 taskItem.creator_id = item.creatorsID; 177 taskItem.creator_id = item.creatorsID;
178 taskItem.type = TaskInventoryItem.Types[item.assetType]; 178 taskItem.type = item.assetType;
179 taskItem.inv_type = TaskInventoryItem.InvTypes[item.invType]; 179 taskItem.inv_type = item.invType;
180 part.AddInventoryItem(taskItem); 180 part.AddInventoryItem(taskItem);
181 181
182 // It might seem somewhat crude to update the whole group for a single prim inventory change, 182 // It might seem somewhat crude to update the whole group for a single prim inventory change,
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index 5d197e3..1dd7e35 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -89,7 +89,8 @@ namespace OpenSim.Region.Environment.Scenes
89 { 89 {
90 foreach (TaskInventoryItem item in m_taskInventory.Values) 90 foreach (TaskInventoryItem item in m_taskInventory.Values)
91 { 91 {
92 if ("lsltext" == item.type) 92 // XXX more hardcoding badness. Should be an enum in TaskInventoryItem
93 if (10 == item.type)
93 { 94 {
94 StartScript(item); 95 StartScript(item);
95 } 96 }
@@ -251,17 +252,11 @@ namespace OpenSim.Region.Environment.Scenes
251 { 252 {
252 if (m_taskInventory.ContainsKey(itemID)) 253 if (m_taskInventory.ContainsKey(itemID))
253 { 254 {
254 string type = m_taskInventory[itemID].inv_type; 255 int type = m_taskInventory[itemID].inv_type;
255 m_taskInventory.Remove(itemID); 256 m_taskInventory.Remove(itemID);
256 m_inventorySerial++; 257 m_inventorySerial++;
257 if (type == "lsltext") 258
258 { 259 return type;
259 return 10;
260 }
261 else
262 {
263 return 0;
264 }
265 } 260 }
266 else 261 else
267 { 262 {
@@ -317,8 +312,8 @@ namespace OpenSim.Region.Environment.Scenes
317 invString.AddSectionEnd(); 312 invString.AddSectionEnd();
318 313
319 invString.AddNameValueLine("asset_id", item.asset_id.ToString()); 314 invString.AddNameValueLine("asset_id", item.asset_id.ToString());
320 invString.AddNameValueLine("type", item.type); 315 invString.AddNameValueLine("type", TaskInventoryItem.Types[item.type]);
321 invString.AddNameValueLine("inv_type", item.inv_type); 316 invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.inv_type]);
322 invString.AddNameValueLine("flags", "0x00"); 317 invString.AddNameValueLine("flags", "0x00");
323 invString.AddNameValueLine("name", item.name + "|"); 318 invString.AddNameValueLine("name", item.name + "|");
324 invString.AddNameValueLine("desc", item.desc + "|"); 319 invString.AddNameValueLine("desc", item.desc + "|");
diff --git a/OpenSim/Region/Environment/StorageManager.cs b/OpenSim/Region/Environment/StorageManager.cs
index 2c04309..5629483 100644
--- a/OpenSim/Region/Environment/StorageManager.cs
+++ b/OpenSim/Region/Environment/StorageManager.cs
@@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment
62 { 62 {
63 IRegionDataStore plug = 63 IRegionDataStore plug =
64 (IRegionDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 64 (IRegionDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
65 plug.Initialise(connectionstring, false); 65 plug.Initialise(connectionstring, true);
66 66
67 m_dataStore = plug; 67 m_dataStore = plug;
68 68
@@ -74,4 +74,4 @@ namespace OpenSim.Region.Environment
74 //TODO: Add checking and warning to make sure it initialised. 74 //TODO: Add checking and warning to make sure it initialised.
75 } 75 }
76 } 76 }
77} \ No newline at end of file 77}