diff options
author | Justin Clarke Casey | 2008-01-11 14:55:27 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-01-11 14:55:27 +0000 |
commit | 1e981a7c1cbf6abf1e60cf2ddc3ce9074d6543a6 (patch) | |
tree | 7de3586c0d4c7be06c2a6087ec8d8496cfb2f5d8 /OpenSim/Region/Environment/Scenes | |
parent | * quick fix to fix if webLoginKey is null in DB, return random key (I guess L... (diff) | |
download | opensim-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')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | 19 |
2 files changed, 9 insertions, 14 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 + "|"); |