aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
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/Scenes/SceneObjectPart.Inventory.cs
parent* quick fix to fix if webLoginKey is null in DB, return random key (I guess L... (diff)
downloadopensim-SC-1e981a7c1cbf6abf1e60cf2ddc3ce9074d6543a6.zip
opensim-SC-1e981a7c1cbf6abf1e60cf2ddc3ce9074d6543a6.tar.gz
opensim-SC-1e981a7c1cbf6abf1e60cf2ddc3ce9074d6543a6.tar.bz2
opensim-SC-1e981a7c1cbf6abf1e60cf2ddc3ce9074d6543a6.tar.xz
Switch prim items type representation to use int rather than strings.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs19
1 files changed, 7 insertions, 12 deletions
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 + "|");