aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
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/Region/Environment
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 '')
-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
3 files changed, 11 insertions, 16 deletions
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}