diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | 19 |
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 + "|"); |