diff options
Diffstat (limited to 'OpenSim')
16 files changed, 443 insertions, 324 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs index df7020d..15078aa 100644 --- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs | |||
@@ -301,19 +301,19 @@ namespace OpenSim.Data.MSSQL | |||
301 | { | 301 | { |
302 | InventoryItemBase item = new InventoryItemBase(); | 302 | InventoryItemBase item = new InventoryItemBase(); |
303 | 303 | ||
304 | item.inventoryID = new LLUUID((string) reader["inventoryID"]); | 304 | item.ID = new LLUUID((string) reader["inventoryID"]); |
305 | item.assetID = new LLUUID((string) reader["assetID"]); | 305 | item.AssetID = new LLUUID((string) reader["assetID"]); |
306 | item.assetType = (int) reader["assetType"]; | 306 | item.AssetType = (int) reader["assetType"]; |
307 | item.parentFolderID = new LLUUID((string) reader["parentFolderID"]); | 307 | item.Folder = new LLUUID((string) reader["parentFolderID"]); |
308 | item.avatarID = new LLUUID((string) reader["avatarID"]); | 308 | item.Owner = new LLUUID((string) reader["avatarID"]); |
309 | item.inventoryName = (string) reader["inventoryName"]; | 309 | item.Name = (string) reader["inventoryName"]; |
310 | item.inventoryDescription = (string) reader["inventoryDescription"]; | 310 | item.Description = (string) reader["inventoryDescription"]; |
311 | item.inventoryNextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"]); | 311 | item.NextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"]); |
312 | item.inventoryCurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"]); | 312 | item.CurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"]); |
313 | item.invType = (int) reader["invType"]; | 313 | item.InvType = (int) reader["invType"]; |
314 | item.creatorsID = new LLUUID((string) reader["creatorID"]); | 314 | item.Creator = new LLUUID((string) reader["creatorID"]); |
315 | item.inventoryBasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]); | 315 | item.BasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]); |
316 | item.inventoryEveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]); | 316 | item.EveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]); |
317 | return item; | 317 | return item; |
318 | } | 318 | } |
319 | catch (SqlException e) | 319 | catch (SqlException e) |
@@ -425,7 +425,7 @@ namespace OpenSim.Data.MSSQL | |||
425 | /// <param name="item">The inventory item</param> | 425 | /// <param name="item">The inventory item</param> |
426 | public void addInventoryItem(InventoryItemBase item) | 426 | public void addInventoryItem(InventoryItemBase item) |
427 | { | 427 | { |
428 | if (getInventoryItem(item.inventoryID) != null) | 428 | if (getInventoryItem(item.ID) != null) |
429 | { | 429 | { |
430 | updateInventoryItem(item); | 430 | updateInventoryItem(item); |
431 | return; | 431 | return; |
@@ -440,19 +440,19 @@ namespace OpenSim.Data.MSSQL | |||
440 | try | 440 | try |
441 | { | 441 | { |
442 | Dictionary<string, string> param = new Dictionary<string, string>(); | 442 | Dictionary<string, string> param = new Dictionary<string, string>(); |
443 | param["inventoryID"] = item.inventoryID.ToString(); | 443 | param["inventoryID"] = item.ID.ToString(); |
444 | param["assetID"] = item.assetID.ToString(); | 444 | param["assetID"] = item.AssetID.ToString(); |
445 | param["assetType"] = item.assetType.ToString(); | 445 | param["assetType"] = item.AssetType.ToString(); |
446 | param["parentFolderID"] = item.parentFolderID.ToString(); | 446 | param["parentFolderID"] = item.Folder.ToString(); |
447 | param["avatarID"] = item.avatarID.ToString(); | 447 | param["avatarID"] = item.Owner.ToString(); |
448 | param["inventoryName"] = item.inventoryName; | 448 | param["inventoryName"] = item.Name; |
449 | param["inventoryDescription"] = item.inventoryDescription; | 449 | param["inventoryDescription"] = item.Description; |
450 | param["inventoryNextPermissions"] = item.inventoryNextPermissions.ToString(); | 450 | param["inventoryNextPermissions"] = item.NextPermissions.ToString(); |
451 | param["inventoryCurrentPermissions"] = item.inventoryCurrentPermissions.ToString(); | 451 | param["inventoryCurrentPermissions"] = item.CurrentPermissions.ToString(); |
452 | param["invType"] = Convert.ToString(item.invType); | 452 | param["invType"] = Convert.ToString(item.InvType); |
453 | param["creatorID"] = item.creatorsID.ToString(); | 453 | param["creatorID"] = item.Creator.ToString(); |
454 | param["inventoryBasePermissions"] = Convert.ToString(item.inventoryBasePermissions); | 454 | param["inventoryBasePermissions"] = Convert.ToString(item.BasePermissions); |
455 | param["inventoryEveryOnePermissions"] = Convert.ToString(item.inventoryEveryOnePermissions); | 455 | param["inventoryEveryOnePermissions"] = Convert.ToString(item.EveryOnePermissions); |
456 | 456 | ||
457 | IDbCommand result = database.Query(sql, param); | 457 | IDbCommand result = database.Query(sql, param); |
458 | result.ExecuteNonQuery(); | 458 | result.ExecuteNonQuery(); |
@@ -484,20 +484,20 @@ namespace OpenSim.Data.MSSQL | |||
484 | "inventoryBasePermissions = @inventoryBasePermissions" + | 484 | "inventoryBasePermissions = @inventoryBasePermissions" + |
485 | "inventoryEveryOnePermissions = @inventoryEveryOnePermissions) where " + | 485 | "inventoryEveryOnePermissions = @inventoryEveryOnePermissions) where " + |
486 | "inventoryID = @keyInventoryID;", database.getConnection()); | 486 | "inventoryID = @keyInventoryID;", database.getConnection()); |
487 | SqlParameter param1 = new SqlParameter("@inventoryID", item.inventoryID.ToString()); | 487 | SqlParameter param1 = new SqlParameter("@inventoryID", item.ID.ToString()); |
488 | SqlParameter param2 = new SqlParameter("@assetID", item.assetID); | 488 | SqlParameter param2 = new SqlParameter("@assetID", item.AssetID); |
489 | SqlParameter param3 = new SqlParameter("@assetType", item.assetType); | 489 | SqlParameter param3 = new SqlParameter("@assetType", item.AssetType); |
490 | SqlParameter param4 = new SqlParameter("@parentFolderID", item.parentFolderID); | 490 | SqlParameter param4 = new SqlParameter("@parentFolderID", item.Folder); |
491 | SqlParameter param5 = new SqlParameter("@avatarID", item.avatarID); | 491 | SqlParameter param5 = new SqlParameter("@avatarID", item.Owner); |
492 | SqlParameter param6 = new SqlParameter("@inventoryName", item.inventoryName); | 492 | SqlParameter param6 = new SqlParameter("@inventoryName", item.Name); |
493 | SqlParameter param7 = new SqlParameter("@inventoryDescription", item.inventoryDescription); | 493 | SqlParameter param7 = new SqlParameter("@inventoryDescription", item.Description); |
494 | SqlParameter param8 = new SqlParameter("@inventoryNextPermissions", item.inventoryNextPermissions); | 494 | SqlParameter param8 = new SqlParameter("@inventoryNextPermissions", item.NextPermissions); |
495 | SqlParameter param9 = new SqlParameter("@inventoryCurrentPermissions", item.inventoryCurrentPermissions); | 495 | SqlParameter param9 = new SqlParameter("@inventoryCurrentPermissions", item.CurrentPermissions); |
496 | SqlParameter param10 = new SqlParameter("@invType", item.invType); | 496 | SqlParameter param10 = new SqlParameter("@invType", item.InvType); |
497 | SqlParameter param11 = new SqlParameter("@creatorID", item.creatorsID); | 497 | SqlParameter param11 = new SqlParameter("@creatorID", item.Creator); |
498 | SqlParameter param12 = new SqlParameter("@inventoryBasePermissions", item.inventoryBasePermissions); | 498 | SqlParameter param12 = new SqlParameter("@inventoryBasePermissions", item.BasePermissions); |
499 | SqlParameter param13 = new SqlParameter("@inventoryEveryOnePermissions", item.inventoryEveryOnePermissions); | 499 | SqlParameter param13 = new SqlParameter("@inventoryEveryOnePermissions", item.EveryOnePermissions); |
500 | SqlParameter param14 = new SqlParameter("@keyInventoryID", item.inventoryID.ToString()); | 500 | SqlParameter param14 = new SqlParameter("@keyInventoryID", item.ID.ToString()); |
501 | command.Parameters.Add(param1); | 501 | command.Parameters.Add(param1); |
502 | command.Parameters.Add(param2); | 502 | command.Parameters.Add(param2); |
503 | command.Parameters.Add(param3); | 503 | command.Parameters.Add(param3); |
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index ceb73c5..6bb7a53 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -312,19 +312,19 @@ namespace OpenSim.Data.MySQL | |||
312 | { | 312 | { |
313 | InventoryItemBase item = new InventoryItemBase(); | 313 | InventoryItemBase item = new InventoryItemBase(); |
314 | 314 | ||
315 | item.inventoryID = new LLUUID((string) reader["inventoryID"]); | 315 | item.ID = new LLUUID((string) reader["inventoryID"]); |
316 | item.assetID = new LLUUID((string) reader["assetID"]); | 316 | item.AssetID = new LLUUID((string) reader["assetID"]); |
317 | item.assetType = (int) reader["assetType"]; | 317 | item.AssetType = (int) reader["assetType"]; |
318 | item.parentFolderID = new LLUUID((string) reader["parentFolderID"]); | 318 | item.Folder = new LLUUID((string) reader["parentFolderID"]); |
319 | item.avatarID = new LLUUID((string) reader["avatarID"]); | 319 | item.Owner = new LLUUID((string) reader["avatarID"]); |
320 | item.inventoryName = (string) reader["inventoryName"]; | 320 | item.Name = (string) reader["inventoryName"]; |
321 | item.inventoryDescription = (string) reader["inventoryDescription"]; | 321 | item.Description = (string) reader["inventoryDescription"]; |
322 | item.inventoryNextPermissions = (uint) reader["inventoryNextPermissions"]; | 322 | item.NextPermissions = (uint) reader["inventoryNextPermissions"]; |
323 | item.inventoryCurrentPermissions = (uint) reader["inventoryCurrentPermissions"]; | 323 | item.CurrentPermissions = (uint) reader["inventoryCurrentPermissions"]; |
324 | item.invType = (int) reader["invType"]; | 324 | item.InvType = (int) reader["invType"]; |
325 | item.creatorsID = new LLUUID((string) reader["creatorID"]); | 325 | item.Creator = new LLUUID((string) reader["creatorID"]); |
326 | item.inventoryBasePermissions = (uint) reader["inventoryBasePermissions"]; | 326 | item.BasePermissions = (uint) reader["inventoryBasePermissions"]; |
327 | item.inventoryEveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; | 327 | item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; |
328 | return item; | 328 | return item; |
329 | } | 329 | } |
330 | catch (MySqlException e) | 330 | catch (MySqlException e) |
@@ -444,20 +444,20 @@ namespace OpenSim.Data.MySQL | |||
444 | try | 444 | try |
445 | { | 445 | { |
446 | MySqlCommand result = new MySqlCommand(sql, database.Connection); | 446 | MySqlCommand result = new MySqlCommand(sql, database.Connection); |
447 | result.Parameters.AddWithValue("?inventoryID", item.inventoryID.ToString()); | 447 | result.Parameters.AddWithValue("?inventoryID", item.ID.ToString()); |
448 | result.Parameters.AddWithValue("?assetID", item.assetID.ToString()); | 448 | result.Parameters.AddWithValue("?assetID", item.AssetID.ToString()); |
449 | result.Parameters.AddWithValue("?assetType", item.assetType.ToString()); | 449 | result.Parameters.AddWithValue("?assetType", item.AssetType.ToString()); |
450 | result.Parameters.AddWithValue("?parentFolderID", item.parentFolderID.ToString()); | 450 | result.Parameters.AddWithValue("?parentFolderID", item.Folder.ToString()); |
451 | result.Parameters.AddWithValue("?avatarID", item.avatarID.ToString()); | 451 | result.Parameters.AddWithValue("?avatarID", item.Owner.ToString()); |
452 | result.Parameters.AddWithValue("?inventoryName", item.inventoryName); | 452 | result.Parameters.AddWithValue("?inventoryName", item.Name); |
453 | result.Parameters.AddWithValue("?inventoryDescription", item.inventoryDescription); | 453 | result.Parameters.AddWithValue("?inventoryDescription", item.Description); |
454 | result.Parameters.AddWithValue("?inventoryNextPermissions", item.inventoryNextPermissions.ToString()); | 454 | result.Parameters.AddWithValue("?inventoryNextPermissions", item.NextPermissions.ToString()); |
455 | result.Parameters.AddWithValue("?inventoryCurrentPermissions", | 455 | result.Parameters.AddWithValue("?inventoryCurrentPermissions", |
456 | item.inventoryCurrentPermissions.ToString()); | 456 | item.CurrentPermissions.ToString()); |
457 | result.Parameters.AddWithValue("?invType", item.invType); | 457 | result.Parameters.AddWithValue("?invType", item.InvType); |
458 | result.Parameters.AddWithValue("?creatorID", item.creatorsID.ToString()); | 458 | result.Parameters.AddWithValue("?creatorID", item.Creator.ToString()); |
459 | result.Parameters.AddWithValue("?inventoryBasePermissions", item.inventoryBasePermissions); | 459 | result.Parameters.AddWithValue("?inventoryBasePermissions", item.BasePermissions); |
460 | result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.inventoryEveryOnePermissions); | 460 | result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.EveryOnePermissions); |
461 | result.ExecuteNonQuery(); | 461 | result.ExecuteNonQuery(); |
462 | result.Dispose(); | 462 | result.Dispose(); |
463 | } | 463 | } |
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs index d6cd664..ba1d3e9 100644 --- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs +++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs | |||
@@ -112,7 +112,7 @@ namespace OpenSim.Data.NHibernate | |||
112 | /// <param name="item">The item to be created</param> | 112 | /// <param name="item">The item to be created</param> |
113 | public void addInventoryItem(InventoryItemBase item) | 113 | public void addInventoryItem(InventoryItemBase item) |
114 | { | 114 | { |
115 | if (!ExistsItem(item.inventoryID)) { | 115 | if (!ExistsItem(item.ID)) { |
116 | using(ISession session = factory.OpenSession()) { | 116 | using(ISession session = factory.OpenSession()) { |
117 | using(ITransaction transaction = session.BeginTransaction()) { | 117 | using(ITransaction transaction = session.BeginTransaction()) { |
118 | session.Save(item); | 118 | session.Save(item); |
@@ -120,7 +120,7 @@ namespace OpenSim.Data.NHibernate | |||
120 | } | 120 | } |
121 | } | 121 | } |
122 | } else { | 122 | } else { |
123 | m_log.ErrorFormat("Attempted to add Inventory Item {0} that already exists, updating instead", item.inventoryID); | 123 | m_log.ErrorFormat("Attempted to add Inventory Item {0} that already exists, updating instead", item.ID); |
124 | updateInventoryItem(item); | 124 | updateInventoryItem(item); |
125 | } | 125 | } |
126 | } | 126 | } |
@@ -131,7 +131,7 @@ namespace OpenSim.Data.NHibernate | |||
131 | /// <param name="item">The updated item</param> | 131 | /// <param name="item">The updated item</param> |
132 | public void updateInventoryItem(InventoryItemBase item) | 132 | public void updateInventoryItem(InventoryItemBase item) |
133 | { | 133 | { |
134 | if (ExistsItem(item.inventoryID)) { | 134 | if (ExistsItem(item.ID)) { |
135 | using(ISession session = factory.OpenSession()) { | 135 | using(ISession session = factory.OpenSession()) { |
136 | using(ITransaction transaction = session.BeginTransaction()) { | 136 | using(ITransaction transaction = session.BeginTransaction()) { |
137 | session.Update(item); | 137 | session.Update(item); |
@@ -139,7 +139,7 @@ namespace OpenSim.Data.NHibernate | |||
139 | } | 139 | } |
140 | } | 140 | } |
141 | } else { | 141 | } else { |
142 | m_log.ErrorFormat("Attempted to add Inventory Item {0} that already exists", item.inventoryID); | 142 | m_log.ErrorFormat("Attempted to add Inventory Item {0} that already exists", item.ID); |
143 | } | 143 | } |
144 | } | 144 | } |
145 | 145 | ||
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index 1554aa3..f0ff7c9 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs | |||
@@ -91,39 +91,39 @@ namespace OpenSim.Data.SQLite | |||
91 | public InventoryItemBase buildItem(DataRow row) | 91 | public InventoryItemBase buildItem(DataRow row) |
92 | { | 92 | { |
93 | InventoryItemBase item = new InventoryItemBase(); | 93 | InventoryItemBase item = new InventoryItemBase(); |
94 | item.inventoryID = new LLUUID((string) row["UUID"]); | 94 | item.ID = new LLUUID((string) row["UUID"]); |
95 | item.assetID = new LLUUID((string) row["assetID"]); | 95 | item.AssetID = new LLUUID((string) row["assetID"]); |
96 | item.assetType = Convert.ToInt32(row["assetType"]); | 96 | item.AssetType = Convert.ToInt32(row["assetType"]); |
97 | item.invType = Convert.ToInt32(row["invType"]); | 97 | item.InvType = Convert.ToInt32(row["invType"]); |
98 | item.parentFolderID = new LLUUID((string) row["parentFolderID"]); | 98 | item.Folder = new LLUUID((string) row["parentFolderID"]); |
99 | item.avatarID = new LLUUID((string) row["avatarID"]); | 99 | item.Owner = new LLUUID((string) row["avatarID"]); |
100 | item.creatorsID = new LLUUID((string) row["creatorsID"]); | 100 | item.Creator = new LLUUID((string) row["creatorsID"]); |
101 | item.inventoryName = (string) row["inventoryName"]; | 101 | item.Name = (string) row["inventoryName"]; |
102 | item.inventoryDescription = (string) row["inventoryDescription"]; | 102 | item.Description = (string) row["inventoryDescription"]; |
103 | 103 | ||
104 | item.inventoryNextPermissions = Convert.ToUInt32(row["inventoryNextPermissions"]); | 104 | item.NextPermissions = Convert.ToUInt32(row["inventoryNextPermissions"]); |
105 | item.inventoryCurrentPermissions = Convert.ToUInt32(row["inventoryCurrentPermissions"]); | 105 | item.CurrentPermissions = Convert.ToUInt32(row["inventoryCurrentPermissions"]); |
106 | item.inventoryBasePermissions = Convert.ToUInt32(row["inventoryBasePermissions"]); | 106 | item.BasePermissions = Convert.ToUInt32(row["inventoryBasePermissions"]); |
107 | item.inventoryEveryOnePermissions = Convert.ToUInt32(row["inventoryEveryOnePermissions"]); | 107 | item.EveryOnePermissions = Convert.ToUInt32(row["inventoryEveryOnePermissions"]); |
108 | return item; | 108 | return item; |
109 | } | 109 | } |
110 | 110 | ||
111 | private void fillItemRow(DataRow row, InventoryItemBase item) | 111 | private void fillItemRow(DataRow row, InventoryItemBase item) |
112 | { | 112 | { |
113 | row["UUID"] = Util.ToRawUuidString(item.inventoryID); | 113 | row["UUID"] = Util.ToRawUuidString(item.ID); |
114 | row["assetID"] = Util.ToRawUuidString(item.assetID); | 114 | row["assetID"] = Util.ToRawUuidString(item.AssetID); |
115 | row["assetType"] = item.assetType; | 115 | row["assetType"] = item.AssetType; |
116 | row["invType"] = item.invType; | 116 | row["invType"] = item.InvType; |
117 | row["parentFolderID"] = Util.ToRawUuidString(item.parentFolderID); | 117 | row["parentFolderID"] = Util.ToRawUuidString(item.Folder); |
118 | row["avatarID"] = Util.ToRawUuidString(item.avatarID); | 118 | row["avatarID"] = Util.ToRawUuidString(item.Owner); |
119 | row["creatorsID"] = Util.ToRawUuidString(item.creatorsID); | 119 | row["creatorsID"] = Util.ToRawUuidString(item.Creator); |
120 | row["inventoryName"] = item.inventoryName; | 120 | row["inventoryName"] = item.Name; |
121 | row["inventoryDescription"] = item.inventoryDescription; | 121 | row["inventoryDescription"] = item.Description; |
122 | 122 | ||
123 | row["inventoryNextPermissions"] = item.inventoryNextPermissions; | 123 | row["inventoryNextPermissions"] = item.NextPermissions; |
124 | row["inventoryCurrentPermissions"] = item.inventoryCurrentPermissions; | 124 | row["inventoryCurrentPermissions"] = item.CurrentPermissions; |
125 | row["inventoryBasePermissions"] = item.inventoryBasePermissions; | 125 | row["inventoryBasePermissions"] = item.BasePermissions; |
126 | row["inventoryEveryOnePermissions"] = item.inventoryEveryOnePermissions; | 126 | row["inventoryEveryOnePermissions"] = item.EveryOnePermissions; |
127 | } | 127 | } |
128 | 128 | ||
129 | private void addFolder(InventoryFolderBase folder, bool add) | 129 | private void addFolder(InventoryFolderBase folder, bool add) |
@@ -182,11 +182,11 @@ namespace OpenSim.Data.SQLite | |||
182 | { | 182 | { |
183 | DataTable inventoryItemTable = ds.Tables["inventoryitems"]; | 183 | DataTable inventoryItemTable = ds.Tables["inventoryitems"]; |
184 | 184 | ||
185 | DataRow inventoryRow = inventoryItemTable.Rows.Find(Util.ToRawUuidString(item.inventoryID)); | 185 | DataRow inventoryRow = inventoryItemTable.Rows.Find(Util.ToRawUuidString(item.ID)); |
186 | if (inventoryRow == null) | 186 | if (inventoryRow == null) |
187 | { | 187 | { |
188 | if (! add) | 188 | if (! add) |
189 | m_log.ErrorFormat("Interface Misuse: Attempting to Update non-existant inventory item: {0}", item.inventoryID); | 189 | m_log.ErrorFormat("Interface Misuse: Attempting to Update non-existant inventory item: {0}", item.ID); |
190 | 190 | ||
191 | inventoryRow = inventoryItemTable.NewRow(); | 191 | inventoryRow = inventoryItemTable.NewRow(); |
192 | fillItemRow(inventoryRow, item); | 192 | fillItemRow(inventoryRow, item); |
@@ -195,7 +195,7 @@ namespace OpenSim.Data.SQLite | |||
195 | else | 195 | else |
196 | { | 196 | { |
197 | if (add) | 197 | if (add) |
198 | m_log.ErrorFormat("Interface Misuse: Attempting to Add inventory item that already exists: {0}", item.inventoryID); | 198 | m_log.ErrorFormat("Interface Misuse: Attempting to Add inventory item that already exists: {0}", item.ID); |
199 | 199 | ||
200 | fillItemRow(inventoryRow, item); | 200 | fillItemRow(inventoryRow, item); |
201 | } | 201 | } |
@@ -439,7 +439,7 @@ namespace OpenSim.Data.SQLite | |||
439 | List<InventoryItemBase> items = getInventoryInFolder(Util.ToRawUuidString(folderId)); | 439 | List<InventoryItemBase> items = getInventoryInFolder(Util.ToRawUuidString(folderId)); |
440 | 440 | ||
441 | foreach (InventoryItemBase i in items) | 441 | foreach (InventoryItemBase i in items) |
442 | deleteInventoryItem(Util.ToRawUuidString(i.inventoryID)); | 442 | deleteInventoryItem(Util.ToRawUuidString(i.ID)); |
443 | } | 443 | } |
444 | 444 | ||
445 | /// <summary> | 445 | /// <summary> |
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index f2dd2bf..cb1eb5a 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -171,21 +171,21 @@ namespace OpenSim.Framework.Communications.Cache | |||
171 | { | 171 | { |
172 | if ((userID == UserProfile.UUID) && (RootFolder != null)) | 172 | if ((userID == UserProfile.UUID) && (RootFolder != null)) |
173 | { | 173 | { |
174 | if (itemInfo.parentFolderID == RootFolder.folderID) | 174 | if (itemInfo.Folder == RootFolder.folderID) |
175 | { | 175 | { |
176 | if (!RootFolder.Items.ContainsKey(itemInfo.inventoryID)) | 176 | if (!RootFolder.Items.ContainsKey(itemInfo.ID)) |
177 | { | 177 | { |
178 | RootFolder.Items.Add(itemInfo.inventoryID, itemInfo); | 178 | RootFolder.Items.Add(itemInfo.ID, itemInfo); |
179 | } | 179 | } |
180 | } | 180 | } |
181 | else | 181 | else |
182 | { | 182 | { |
183 | InventoryFolderImpl folder = RootFolder.HasSubFolder(itemInfo.parentFolderID); | 183 | InventoryFolderImpl folder = RootFolder.HasSubFolder(itemInfo.Folder); |
184 | if (folder != null) | 184 | if (folder != null) |
185 | { | 185 | { |
186 | if (!folder.Items.ContainsKey(itemInfo.inventoryID)) | 186 | if (!folder.Items.ContainsKey(itemInfo.ID)) |
187 | { | 187 | { |
188 | folder.Items.Add(itemInfo.inventoryID, itemInfo); | 188 | folder.Items.Add(itemInfo.ID, itemInfo); |
189 | } | 189 | } |
190 | } | 190 | } |
191 | } | 191 | } |
@@ -214,7 +214,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
214 | bool result = false; | 214 | bool result = false; |
215 | if ((userID == UserProfile.UUID) && (RootFolder != null)) | 215 | if ((userID == UserProfile.UUID) && (RootFolder != null)) |
216 | { | 216 | { |
217 | result = RootFolder.DeleteItem(item.inventoryID); | 217 | result = RootFolder.DeleteItem(item.ID); |
218 | if (result) | 218 | if (result) |
219 | { | 219 | { |
220 | m_parentCommsManager.InventoryService.DeleteInventoryItem(userID, item); | 220 | m_parentCommsManager.InventoryService.DeleteInventoryItem(userID, item); |
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs index b624b15..12a07eb 100644 --- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs +++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs | |||
@@ -116,19 +116,19 @@ namespace OpenSim.Framework.Communications.Cache | |||
116 | int assetType, int invType, LLUUID parentFolderID) | 116 | int assetType, int invType, LLUUID parentFolderID) |
117 | { | 117 | { |
118 | InventoryItemBase item = new InventoryItemBase(); | 118 | InventoryItemBase item = new InventoryItemBase(); |
119 | item.avatarID = libOwner; | 119 | item.Owner = libOwner; |
120 | item.creatorsID = libOwner; | 120 | item.Creator = libOwner; |
121 | item.inventoryID = inventoryID; | 121 | item.ID = inventoryID; |
122 | item.assetID = assetID; | 122 | item.AssetID = assetID; |
123 | item.inventoryDescription = description; | 123 | item.Description = description; |
124 | item.inventoryName = name; | 124 | item.Name = name; |
125 | item.assetType = assetType; | 125 | item.AssetType = assetType; |
126 | item.invType = invType; | 126 | item.InvType = invType; |
127 | item.parentFolderID = parentFolderID; | 127 | item.Folder = parentFolderID; |
128 | item.inventoryBasePermissions = 0x7FFFFFFF; | 128 | item.BasePermissions = 0x7FFFFFFF; |
129 | item.inventoryEveryOnePermissions = 0x7FFFFFFF; | 129 | item.EveryOnePermissions = 0x7FFFFFFF; |
130 | item.inventoryCurrentPermissions = 0x7FFFFFFF; | 130 | item.CurrentPermissions = 0x7FFFFFFF; |
131 | item.inventoryNextPermissions = 0x7FFFFFFF; | 131 | item.NextPermissions = 0x7FFFFFFF; |
132 | return item; | 132 | return item; |
133 | } | 133 | } |
134 | 134 | ||
@@ -204,31 +204,31 @@ namespace OpenSim.Framework.Communications.Cache | |||
204 | private void ReadItemFromConfig(IConfig config) | 204 | private void ReadItemFromConfig(IConfig config) |
205 | { | 205 | { |
206 | InventoryItemBase item = new InventoryItemBase(); | 206 | InventoryItemBase item = new InventoryItemBase(); |
207 | item.avatarID = libOwner; | 207 | item.Owner = libOwner; |
208 | item.creatorsID = libOwner; | 208 | item.Creator = libOwner; |
209 | item.inventoryID = new LLUUID(config.GetString("inventoryID", folderID.ToString())); | 209 | item.ID = new LLUUID(config.GetString("inventoryID", folderID.ToString())); |
210 | item.assetID = new LLUUID(config.GetString("assetID", LLUUID.Random().ToString())); | 210 | item.AssetID = new LLUUID(config.GetString("assetID", LLUUID.Random().ToString())); |
211 | item.parentFolderID = new LLUUID(config.GetString("folderID", folderID.ToString())); | 211 | item.Folder = new LLUUID(config.GetString("folderID", folderID.ToString())); |
212 | item.inventoryDescription = config.GetString("description", System.String.Empty); | 212 | item.Description = config.GetString("description", System.String.Empty); |
213 | item.inventoryName = config.GetString("name", System.String.Empty); | 213 | item.Name = config.GetString("name", System.String.Empty); |
214 | item.assetType = config.GetInt("assetType", 0); | 214 | item.AssetType = config.GetInt("assetType", 0); |
215 | item.invType = config.GetInt("inventoryType", 0); | 215 | item.InvType = config.GetInt("inventoryType", 0); |
216 | item.inventoryCurrentPermissions = (uint)config.GetLong("currentPermissions", 0x7FFFFFFF); | 216 | item.CurrentPermissions = (uint)config.GetLong("currentPermissions", 0x7FFFFFFF); |
217 | item.inventoryNextPermissions = (uint)config.GetLong("nextPermissions", 0x7FFFFFFF); | 217 | item.NextPermissions = (uint)config.GetLong("nextPermissions", 0x7FFFFFFF); |
218 | item.inventoryEveryOnePermissions = (uint)config.GetLong("everyonePermissions", 0x7FFFFFFF); | 218 | item.EveryOnePermissions = (uint)config.GetLong("everyonePermissions", 0x7FFFFFFF); |
219 | item.inventoryBasePermissions = (uint)config.GetLong("basePermissions", 0x7FFFFFFF); | 219 | item.BasePermissions = (uint)config.GetLong("basePermissions", 0x7FFFFFFF); |
220 | 220 | ||
221 | if (libraryFolders.ContainsKey(item.parentFolderID)) | 221 | if (libraryFolders.ContainsKey(item.Folder)) |
222 | { | 222 | { |
223 | InventoryFolderImpl parentFolder = libraryFolders[item.parentFolderID]; | 223 | InventoryFolderImpl parentFolder = libraryFolders[item.Folder]; |
224 | 224 | ||
225 | parentFolder.Items.Add(item.inventoryID, item); | 225 | parentFolder.Items.Add(item.ID, item); |
226 | } | 226 | } |
227 | else | 227 | else |
228 | { | 228 | { |
229 | m_log.WarnFormat( | 229 | m_log.WarnFormat( |
230 | "[LIBRARY INVENTORY]: Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!", | 230 | "[LIBRARY INVENTORY]: Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!", |
231 | item.inventoryName, item.inventoryID, item.parentFolderID); | 231 | item.Name, item.ID, item.Folder); |
232 | } | 232 | } |
233 | } | 233 | } |
234 | 234 | ||
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 00de14d..315daab 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs | |||
@@ -294,14 +294,14 @@ namespace OpenSim.Region.Capabilities | |||
294 | private LLSDInventoryItem ConvertInventoryItem(InventoryItemBase invItem) | 294 | private LLSDInventoryItem ConvertInventoryItem(InventoryItemBase invItem) |
295 | { | 295 | { |
296 | LLSDInventoryItem llsdItem = new LLSDInventoryItem(); | 296 | LLSDInventoryItem llsdItem = new LLSDInventoryItem(); |
297 | llsdItem.asset_id = invItem.assetID; | 297 | llsdItem.asset_id = invItem.AssetID; |
298 | llsdItem.created_at = 1000; | 298 | llsdItem.created_at = 1000; |
299 | llsdItem.desc = invItem.inventoryDescription; | 299 | llsdItem.desc = invItem.Description; |
300 | llsdItem.flags = 0; | 300 | llsdItem.flags = 0; |
301 | llsdItem.item_id = invItem.inventoryID; | 301 | llsdItem.item_id = invItem.ID; |
302 | llsdItem.name = invItem.inventoryName; | 302 | llsdItem.name = invItem.Name; |
303 | llsdItem.parent_id = invItem.parentFolderID; | 303 | llsdItem.parent_id = invItem.Folder; |
304 | llsdItem.type = Enum.GetName(typeof(AssetType), invItem.assetType).ToLower(); | 304 | llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower(); |
305 | 305 | ||
306 | // XXX Temporary fix for 'objects not appearing in inventory' problem. The asset type from libsecondlife is | 306 | // XXX Temporary fix for 'objects not appearing in inventory' problem. The asset type from libsecondlife is |
307 | // returning "primitive" when it should returning "object"! It looks like this is fixed in the latest libsecondlife, | 307 | // returning "primitive" when it should returning "object"! It looks like this is fixed in the latest libsecondlife, |
@@ -311,17 +311,17 @@ namespace OpenSim.Region.Capabilities | |||
311 | llsdItem.type = "object"; | 311 | llsdItem.type = "object"; |
312 | } | 312 | } |
313 | 313 | ||
314 | llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.invType).ToLower(); | 314 | llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.InvType).ToLower(); |
315 | llsdItem.permissions = new LLSDPermissions(); | 315 | llsdItem.permissions = new LLSDPermissions(); |
316 | llsdItem.permissions.creator_id = invItem.creatorsID; | 316 | llsdItem.permissions.creator_id = invItem.Creator; |
317 | llsdItem.permissions.base_mask = (int)invItem.inventoryCurrentPermissions; | 317 | llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions; |
318 | llsdItem.permissions.everyone_mask = (int)invItem.inventoryEveryOnePermissions; | 318 | llsdItem.permissions.everyone_mask = (int)invItem.EveryOnePermissions; |
319 | llsdItem.permissions.group_id = LLUUID.Zero; | 319 | llsdItem.permissions.group_id = LLUUID.Zero; |
320 | llsdItem.permissions.group_mask = 0; | 320 | llsdItem.permissions.group_mask = 0; |
321 | llsdItem.permissions.is_owner_group = false; | 321 | llsdItem.permissions.is_owner_group = false; |
322 | llsdItem.permissions.next_owner_mask = (int)invItem.inventoryNextPermissions; | 322 | llsdItem.permissions.next_owner_mask = (int)invItem.NextPermissions; |
323 | llsdItem.permissions.owner_id = m_agentID; // FixMe | 323 | llsdItem.permissions.owner_id = m_agentID; // FixMe |
324 | llsdItem.permissions.owner_mask = (int)invItem.inventoryCurrentPermissions; | 324 | llsdItem.permissions.owner_mask = (int)invItem.CurrentPermissions; |
325 | llsdItem.sale_info = new LLSDSaleInfo(); | 325 | llsdItem.sale_info = new LLSDSaleInfo(); |
326 | llsdItem.sale_info.sale_price = 10; | 326 | llsdItem.sale_info.sale_price = 10; |
327 | llsdItem.sale_info.sale_type = "not"; | 327 | llsdItem.sale_info.sale_type = "not"; |
@@ -587,17 +587,17 @@ namespace OpenSim.Region.Capabilities | |||
587 | m_assetCache.AddAsset(asset); | 587 | m_assetCache.AddAsset(asset); |
588 | 588 | ||
589 | InventoryItemBase item = new InventoryItemBase(); | 589 | InventoryItemBase item = new InventoryItemBase(); |
590 | item.avatarID = m_agentID; | 590 | item.Owner = m_agentID; |
591 | item.creatorsID = m_agentID; | 591 | item.Creator = m_agentID; |
592 | item.inventoryID = inventoryItem; | 592 | item.ID = inventoryItem; |
593 | item.assetID = asset.FullID; | 593 | item.AssetID = asset.FullID; |
594 | item.inventoryDescription = assetDescription; | 594 | item.Description = assetDescription; |
595 | item.inventoryName = assetName; | 595 | item.Name = assetName; |
596 | item.assetType = assType; | 596 | item.AssetType = assType; |
597 | item.invType = inType; | 597 | item.InvType = inType; |
598 | item.parentFolderID = parentFolder; | 598 | item.Folder = parentFolder; |
599 | item.inventoryCurrentPermissions = 2147483647; | 599 | item.CurrentPermissions = 2147483647; |
600 | item.inventoryNextPermissions = 2147483647; | 600 | item.NextPermissions = 2147483647; |
601 | 601 | ||
602 | if (AddNewInventoryItem != null) | 602 | if (AddNewInventoryItem != null) |
603 | { | 603 | { |
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index feb0cca..f41bd27 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs | |||
@@ -218,7 +218,7 @@ namespace OpenSim.Framework.Communications | |||
218 | { | 218 | { |
219 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) | 219 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) |
220 | { | 220 | { |
221 | plugin.Value.deleteInventoryItem(item.inventoryID); | 221 | plugin.Value.deleteInventoryItem(item.ID); |
222 | } | 222 | } |
223 | } | 223 | } |
224 | 224 | ||
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs index 7d146e7..03b47ca 100644 --- a/OpenSim/Framework/InventoryItemBase.cs +++ b/OpenSim/Framework/InventoryItemBase.cs | |||
@@ -40,66 +40,185 @@ namespace OpenSim.Framework | |||
40 | /// <summary> | 40 | /// <summary> |
41 | /// A UUID containing the ID for the inventory item itself | 41 | /// A UUID containing the ID for the inventory item itself |
42 | /// </summary> | 42 | /// </summary> |
43 | public LLUUID inventoryID; | 43 | private LLUUID _id; |
44 | 44 | ||
45 | /// <summary> | 45 | /// <summary> |
46 | /// The UUID of the associated asset on the asset server | 46 | /// The UUID of the associated asset on the asset server |
47 | /// </summary> | 47 | /// </summary> |
48 | public LLUUID assetID; | 48 | private LLUUID _assetID; |
49 | 49 | ||
50 | /// <summary> | 50 | /// <summary> |
51 | /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc) | 51 | /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc) |
52 | /// </summary> | 52 | /// </summary> |
53 | public int assetType; | 53 | private int _assetType; |
54 | 54 | ||
55 | /// <summary> | 55 | /// <summary> |
56 | /// The type of inventory item. (Can be slightly different to the asset type | 56 | /// The type of inventory item. (Can be slightly different to the asset type |
57 | /// </summary> | 57 | /// </summary> |
58 | public int invType; | 58 | private int _invType; |
59 | 59 | ||
60 | /// <summary> | 60 | /// <summary> |
61 | /// The folder this item is contained in | 61 | /// The folder this item is contained in |
62 | /// </summary> | 62 | /// </summary> |
63 | public LLUUID parentFolderID; | 63 | private LLUUID _folder; |
64 | 64 | ||
65 | /// <summary> | 65 | /// <summary> |
66 | /// The owner of this inventory item | 66 | /// The owner of this inventory item |
67 | /// </summary> | 67 | /// </summary> |
68 | public LLUUID avatarID; | 68 | private LLUUID _owner; |
69 | 69 | ||
70 | /// <summary> | 70 | /// <summary> |
71 | /// The creator of this item | 71 | /// The creator of this item |
72 | /// </summary> | 72 | /// </summary> |
73 | public LLUUID creatorsID; | 73 | private LLUUID _creator; |
74 | 74 | ||
75 | /// <summary> | 75 | /// <summary> |
76 | /// The name of the inventory item (must be less than 64 characters) | 76 | /// The name of the inventory item (must be less than 64 characters) |
77 | /// </summary> | 77 | /// </summary> |
78 | public string inventoryName; | 78 | private string _name; |
79 | 79 | ||
80 | /// <summary> | 80 | /// <summary> |
81 | /// The description of the inventory item (must be less than 64 characters) | 81 | /// The description of the inventory item (must be less than 64 characters) |
82 | /// </summary> | 82 | /// </summary> |
83 | public string inventoryDescription; | 83 | private string _description; |
84 | 84 | ||
85 | /// <summary> | 85 | /// <summary> |
86 | /// A mask containing the permissions for the next owner (cannot be enforced) | 86 | /// A mask containing the permissions for the next owner (cannot be enforced) |
87 | /// </summary> | 87 | /// </summary> |
88 | public uint inventoryNextPermissions; | 88 | private uint _nextPermissions; |
89 | 89 | ||
90 | /// <summary> | 90 | /// <summary> |
91 | /// A mask containing permissions for the current owner (cannot be enforced) | 91 | /// A mask containing permissions for the current owner (cannot be enforced) |
92 | /// </summary> | 92 | /// </summary> |
93 | public uint inventoryCurrentPermissions; | 93 | private uint _currentPermissions; |
94 | 94 | ||
95 | /// <summary> | 95 | /// <summary> |
96 | /// | 96 | /// |
97 | /// </summary> | 97 | /// </summary> |
98 | public uint inventoryBasePermissions; | 98 | private uint _basePermissions; |
99 | 99 | ||
100 | /// <summary> | 100 | /// <summary> |
101 | /// | 101 | /// |
102 | /// </summary> | 102 | /// </summary> |
103 | public uint inventoryEveryOnePermissions; | 103 | private uint _everyOnePermissions; |
104 | |||
105 | public LLUUID ID { | ||
106 | get { | ||
107 | return _id; | ||
108 | } | ||
109 | set { | ||
110 | _id = value; | ||
111 | } | ||
112 | } | ||
113 | |||
114 | |||
115 | |||
116 | public int InvType { | ||
117 | get { | ||
118 | return _invType; | ||
119 | } | ||
120 | set { | ||
121 | _invType = value; | ||
122 | } | ||
123 | } | ||
124 | |||
125 | public LLUUID Folder { | ||
126 | get { | ||
127 | return _folder; | ||
128 | } | ||
129 | set { | ||
130 | _folder = value; | ||
131 | } | ||
132 | } | ||
133 | |||
134 | public LLUUID Owner { | ||
135 | get { | ||
136 | return _owner; | ||
137 | } | ||
138 | set { | ||
139 | _owner = value; | ||
140 | } | ||
141 | } | ||
142 | |||
143 | public LLUUID Creator { | ||
144 | get { | ||
145 | return _creator; | ||
146 | } | ||
147 | set { | ||
148 | _creator = value; | ||
149 | } | ||
150 | } | ||
151 | |||
152 | public string Name { | ||
153 | get { | ||
154 | return _name; | ||
155 | } | ||
156 | set { | ||
157 | _name = value; | ||
158 | } | ||
159 | } | ||
160 | |||
161 | public string Description { | ||
162 | get { | ||
163 | return _description; | ||
164 | } | ||
165 | set { | ||
166 | _description = value; | ||
167 | } | ||
168 | } | ||
169 | |||
170 | public uint NextPermissions { | ||
171 | get { | ||
172 | return _nextPermissions; | ||
173 | } | ||
174 | set { | ||
175 | _nextPermissions = value; | ||
176 | } | ||
177 | } | ||
178 | |||
179 | public uint CurrentPermissions { | ||
180 | get { | ||
181 | return _currentPermissions; | ||
182 | } | ||
183 | set { | ||
184 | _currentPermissions = value; | ||
185 | } | ||
186 | } | ||
187 | |||
188 | public uint BasePermissions { | ||
189 | get { | ||
190 | return _basePermissions; | ||
191 | } | ||
192 | set { | ||
193 | _basePermissions = value; | ||
194 | } | ||
195 | } | ||
196 | |||
197 | public uint EveryOnePermissions { | ||
198 | get { | ||
199 | return _everyOnePermissions; | ||
200 | } | ||
201 | set { | ||
202 | _everyOnePermissions = value; | ||
203 | } | ||
204 | } | ||
205 | |||
206 | public int AssetType { | ||
207 | get { | ||
208 | return _assetType; | ||
209 | } | ||
210 | set { | ||
211 | _assetType = value; | ||
212 | } | ||
213 | } | ||
214 | |||
215 | public LLUUID AssetID { | ||
216 | get { | ||
217 | return _assetID; | ||
218 | } | ||
219 | set { | ||
220 | _assetID = value; | ||
221 | } | ||
222 | } | ||
104 | } | 223 | } |
105 | } | 224 | } |
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs index 681e8bb..92d82ab 100644 --- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs +++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs | |||
@@ -189,10 +189,10 @@ namespace OpenSim.Grid.InventoryServer | |||
189 | // Right now, this actions act more like an update/insert combination than a simple create. | 189 | // Right now, this actions act more like an update/insert combination than a simple create. |
190 | m_log.Info( | 190 | m_log.Info( |
191 | "[AGENT INVENTORY]: " + | 191 | "[AGENT INVENTORY]: " + |
192 | "Updating in " + item.parentFolderID.ToString() | 192 | "Updating in " + item.Folder.ToString() |
193 | + ", item " + item.inventoryName); | 193 | + ", item " + item.Name); |
194 | 194 | ||
195 | AddNewInventoryItem(item.avatarID, item); | 195 | AddNewInventoryItem(item.Owner, item); |
196 | return true; | 196 | return true; |
197 | } | 197 | } |
198 | 198 | ||
@@ -201,15 +201,15 @@ namespace OpenSim.Grid.InventoryServer | |||
201 | // extra spaces to align with other inventory messages | 201 | // extra spaces to align with other inventory messages |
202 | m_log.Info( | 202 | m_log.Info( |
203 | "[AGENT INVENTORY]: " + | 203 | "[AGENT INVENTORY]: " + |
204 | "Deleting in " + item.parentFolderID.ToString() | 204 | "Deleting in " + item.Folder.ToString() |
205 | + ", item " + item.inventoryName); | 205 | + ", item " + item.Name); |
206 | 206 | ||
207 | DeleteItem(item); | 207 | DeleteItem(item); |
208 | } | 208 | } |
209 | 209 | ||
210 | public bool DeleteInvItem(InventoryItemBase item) | 210 | public bool DeleteInvItem(InventoryItemBase item) |
211 | { | 211 | { |
212 | DeleteInventoryItem(item.avatarID, item); | 212 | DeleteInventoryItem(item.Owner, item); |
213 | return true; | 213 | return true; |
214 | } | 214 | } |
215 | } | 215 | } |
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 6af32a9..4325b93 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -1219,25 +1219,25 @@ namespace OpenSim.Region.ClientStack | |||
1219 | foreach (InventoryItemBase item in items) | 1219 | foreach (InventoryItemBase item in items) |
1220 | { | 1220 | { |
1221 | descend.ItemData[i] = new InventoryDescendentsPacket.ItemDataBlock(); | 1221 | descend.ItemData[i] = new InventoryDescendentsPacket.ItemDataBlock(); |
1222 | descend.ItemData[i].ItemID = item.inventoryID; | 1222 | descend.ItemData[i].ItemID = item.ID; |
1223 | descend.ItemData[i].AssetID = item.assetID; | 1223 | descend.ItemData[i].AssetID = item.AssetID; |
1224 | descend.ItemData[i].CreatorID = item.creatorsID; | 1224 | descend.ItemData[i].CreatorID = item.Creator; |
1225 | descend.ItemData[i].BaseMask = item.inventoryBasePermissions; | 1225 | descend.ItemData[i].BaseMask = item.BasePermissions; |
1226 | descend.ItemData[i].CreationDate = 1000; | 1226 | descend.ItemData[i].CreationDate = 1000; |
1227 | descend.ItemData[i].Description = Helpers.StringToField(item.inventoryDescription); | 1227 | descend.ItemData[i].Description = Helpers.StringToField(item.Description); |
1228 | descend.ItemData[i].EveryoneMask = item.inventoryEveryOnePermissions; | 1228 | descend.ItemData[i].EveryoneMask = item.EveryOnePermissions; |
1229 | descend.ItemData[i].Flags = 1; | 1229 | descend.ItemData[i].Flags = 1; |
1230 | descend.ItemData[i].FolderID = item.parentFolderID; | 1230 | descend.ItemData[i].FolderID = item.Folder; |
1231 | descend.ItemData[i].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); | 1231 | descend.ItemData[i].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); |
1232 | descend.ItemData[i].GroupMask = 0; | 1232 | descend.ItemData[i].GroupMask = 0; |
1233 | descend.ItemData[i].InvType = (sbyte) item.invType; | 1233 | descend.ItemData[i].InvType = (sbyte) item.InvType; |
1234 | descend.ItemData[i].Name = Helpers.StringToField(item.inventoryName); | 1234 | descend.ItemData[i].Name = Helpers.StringToField(item.Name); |
1235 | descend.ItemData[i].NextOwnerMask = item.inventoryNextPermissions; | 1235 | descend.ItemData[i].NextOwnerMask = item.NextPermissions; |
1236 | descend.ItemData[i].OwnerID = item.avatarID; | 1236 | descend.ItemData[i].OwnerID = item.Owner; |
1237 | descend.ItemData[i].OwnerMask = item.inventoryCurrentPermissions; | 1237 | descend.ItemData[i].OwnerMask = item.CurrentPermissions; |
1238 | descend.ItemData[i].SalePrice = 0; | 1238 | descend.ItemData[i].SalePrice = 0; |
1239 | descend.ItemData[i].SaleType = 0; | 1239 | descend.ItemData[i].SaleType = 0; |
1240 | descend.ItemData[i].Type = (sbyte) item.assetType; | 1240 | descend.ItemData[i].Type = (sbyte) item.AssetType; |
1241 | descend.ItemData[i].CRC = | 1241 | descend.ItemData[i].CRC = |
1242 | Helpers.InventoryCRC(descend.ItemData[i].CreationDate, descend.ItemData[i].SaleType, | 1242 | Helpers.InventoryCRC(descend.ItemData[i].CreationDate, descend.ItemData[i].SaleType, |
1243 | descend.ItemData[i].InvType, descend.ItemData[i].Type, | 1243 | descend.ItemData[i].InvType, descend.ItemData[i].Type, |
@@ -1247,7 +1247,7 @@ namespace OpenSim.Region.ClientStack | |||
1247 | descend.ItemData[i].ItemID, descend.ItemData[i].FolderID, | 1247 | descend.ItemData[i].ItemID, descend.ItemData[i].FolderID, |
1248 | descend.ItemData[i].EveryoneMask, | 1248 | descend.ItemData[i].EveryoneMask, |
1249 | descend.ItemData[i].Flags, descend.ItemData[i].OwnerMask, | 1249 | descend.ItemData[i].Flags, descend.ItemData[i].OwnerMask, |
1250 | descend.ItemData[i].GroupMask, item.inventoryCurrentPermissions); | 1250 | descend.ItemData[i].GroupMask, item.CurrentPermissions); |
1251 | 1251 | ||
1252 | i++; | 1252 | i++; |
1253 | count++; | 1253 | count++; |
@@ -1364,26 +1364,26 @@ namespace OpenSim.Region.ClientStack | |||
1364 | inventoryReply.AgentData.AgentID = AgentId; | 1364 | inventoryReply.AgentData.AgentID = AgentId; |
1365 | inventoryReply.InventoryData = new FetchInventoryReplyPacket.InventoryDataBlock[1]; | 1365 | inventoryReply.InventoryData = new FetchInventoryReplyPacket.InventoryDataBlock[1]; |
1366 | inventoryReply.InventoryData[0] = new FetchInventoryReplyPacket.InventoryDataBlock(); | 1366 | inventoryReply.InventoryData[0] = new FetchInventoryReplyPacket.InventoryDataBlock(); |
1367 | inventoryReply.InventoryData[0].ItemID = item.inventoryID; | 1367 | inventoryReply.InventoryData[0].ItemID = item.ID; |
1368 | inventoryReply.InventoryData[0].AssetID = item.assetID; | 1368 | inventoryReply.InventoryData[0].AssetID = item.AssetID; |
1369 | inventoryReply.InventoryData[0].CreatorID = item.creatorsID; | 1369 | inventoryReply.InventoryData[0].CreatorID = item.Creator; |
1370 | inventoryReply.InventoryData[0].BaseMask = item.inventoryBasePermissions; | 1370 | inventoryReply.InventoryData[0].BaseMask = item.BasePermissions; |
1371 | inventoryReply.InventoryData[0].CreationDate = | 1371 | inventoryReply.InventoryData[0].CreationDate = |
1372 | (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; | 1372 | (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; |
1373 | inventoryReply.InventoryData[0].Description = Helpers.StringToField(item.inventoryDescription); | 1373 | inventoryReply.InventoryData[0].Description = Helpers.StringToField(item.Description); |
1374 | inventoryReply.InventoryData[0].EveryoneMask = item.inventoryEveryOnePermissions; | 1374 | inventoryReply.InventoryData[0].EveryoneMask = item.EveryOnePermissions; |
1375 | inventoryReply.InventoryData[0].Flags = 0; | 1375 | inventoryReply.InventoryData[0].Flags = 0; |
1376 | inventoryReply.InventoryData[0].FolderID = item.parentFolderID; | 1376 | inventoryReply.InventoryData[0].FolderID = item.Folder; |
1377 | inventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); | 1377 | inventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); |
1378 | inventoryReply.InventoryData[0].GroupMask = 0; | 1378 | inventoryReply.InventoryData[0].GroupMask = 0; |
1379 | inventoryReply.InventoryData[0].InvType = (sbyte)item.invType; | 1379 | inventoryReply.InventoryData[0].InvType = (sbyte)item.InvType; |
1380 | inventoryReply.InventoryData[0].Name = Helpers.StringToField(item.inventoryName); | 1380 | inventoryReply.InventoryData[0].Name = Helpers.StringToField(item.Name); |
1381 | inventoryReply.InventoryData[0].NextOwnerMask = item.inventoryNextPermissions; | 1381 | inventoryReply.InventoryData[0].NextOwnerMask = item.NextPermissions; |
1382 | inventoryReply.InventoryData[0].OwnerID = item.avatarID; | 1382 | inventoryReply.InventoryData[0].OwnerID = item.Owner; |
1383 | inventoryReply.InventoryData[0].OwnerMask = item.inventoryCurrentPermissions; | 1383 | inventoryReply.InventoryData[0].OwnerMask = item.CurrentPermissions; |
1384 | inventoryReply.InventoryData[0].SalePrice = 0; | 1384 | inventoryReply.InventoryData[0].SalePrice = 0; |
1385 | inventoryReply.InventoryData[0].SaleType = 0; | 1385 | inventoryReply.InventoryData[0].SaleType = 0; |
1386 | inventoryReply.InventoryData[0].Type = (sbyte)item.assetType; | 1386 | inventoryReply.InventoryData[0].Type = (sbyte)item.AssetType; |
1387 | inventoryReply.InventoryData[0].CRC = | 1387 | inventoryReply.InventoryData[0].CRC = |
1388 | Helpers.InventoryCRC(1000, 0, inventoryReply.InventoryData[0].InvType, | 1388 | Helpers.InventoryCRC(1000, 0, inventoryReply.InventoryData[0].InvType, |
1389 | inventoryReply.InventoryData[0].Type, inventoryReply.InventoryData[0].AssetID, | 1389 | inventoryReply.InventoryData[0].Type, inventoryReply.InventoryData[0].AssetID, |
@@ -1416,25 +1416,25 @@ namespace OpenSim.Region.ClientStack | |||
1416 | 1416 | ||
1417 | bulkUpdate.ItemData = new BulkUpdateInventoryPacket.ItemDataBlock[1]; | 1417 | bulkUpdate.ItemData = new BulkUpdateInventoryPacket.ItemDataBlock[1]; |
1418 | bulkUpdate.ItemData[0] = new BulkUpdateInventoryPacket.ItemDataBlock(); | 1418 | bulkUpdate.ItemData[0] = new BulkUpdateInventoryPacket.ItemDataBlock(); |
1419 | bulkUpdate.ItemData[0].ItemID = item.inventoryID; | 1419 | bulkUpdate.ItemData[0].ItemID = item.ID; |
1420 | bulkUpdate.ItemData[0].AssetID = item.assetID; | 1420 | bulkUpdate.ItemData[0].AssetID = item.AssetID; |
1421 | bulkUpdate.ItemData[0].CreatorID = item.creatorsID; | 1421 | bulkUpdate.ItemData[0].CreatorID = item.Creator; |
1422 | bulkUpdate.ItemData[0].BaseMask = item.inventoryBasePermissions; | 1422 | bulkUpdate.ItemData[0].BaseMask = item.BasePermissions; |
1423 | bulkUpdate.ItemData[0].CreationDate = 1000; | 1423 | bulkUpdate.ItemData[0].CreationDate = 1000; |
1424 | bulkUpdate.ItemData[0].Description = Helpers.StringToField(item.inventoryDescription); | 1424 | bulkUpdate.ItemData[0].Description = Helpers.StringToField(item.Description); |
1425 | bulkUpdate.ItemData[0].EveryoneMask = item.inventoryEveryOnePermissions; | 1425 | bulkUpdate.ItemData[0].EveryoneMask = item.EveryOnePermissions; |
1426 | bulkUpdate.ItemData[0].Flags = 0; | 1426 | bulkUpdate.ItemData[0].Flags = 0; |
1427 | bulkUpdate.ItemData[0].FolderID = item.parentFolderID; | 1427 | bulkUpdate.ItemData[0].FolderID = item.Folder; |
1428 | bulkUpdate.ItemData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); | 1428 | bulkUpdate.ItemData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); |
1429 | bulkUpdate.ItemData[0].GroupMask = 0; | 1429 | bulkUpdate.ItemData[0].GroupMask = 0; |
1430 | bulkUpdate.ItemData[0].InvType = (sbyte)item.invType; | 1430 | bulkUpdate.ItemData[0].InvType = (sbyte)item.InvType; |
1431 | bulkUpdate.ItemData[0].Name = Helpers.StringToField(item.inventoryName); | 1431 | bulkUpdate.ItemData[0].Name = Helpers.StringToField(item.Name); |
1432 | bulkUpdate.ItemData[0].NextOwnerMask = item.inventoryNextPermissions; | 1432 | bulkUpdate.ItemData[0].NextOwnerMask = item.NextPermissions; |
1433 | bulkUpdate.ItemData[0].OwnerID = item.avatarID; | 1433 | bulkUpdate.ItemData[0].OwnerID = item.Owner; |
1434 | bulkUpdate.ItemData[0].OwnerMask = item.inventoryCurrentPermissions; | 1434 | bulkUpdate.ItemData[0].OwnerMask = item.CurrentPermissions; |
1435 | bulkUpdate.ItemData[0].SalePrice = 100; | 1435 | bulkUpdate.ItemData[0].SalePrice = 100; |
1436 | bulkUpdate.ItemData[0].SaleType = 0; | 1436 | bulkUpdate.ItemData[0].SaleType = 0; |
1437 | bulkUpdate.ItemData[0].Type = (sbyte)item.assetType; | 1437 | bulkUpdate.ItemData[0].Type = (sbyte)item.AssetType; |
1438 | bulkUpdate.ItemData[0].CRC = | 1438 | bulkUpdate.ItemData[0].CRC = |
1439 | Helpers.InventoryCRC(1000, 0, bulkUpdate.ItemData[0].InvType, | 1439 | Helpers.InventoryCRC(1000, 0, bulkUpdate.ItemData[0].InvType, |
1440 | bulkUpdate.ItemData[0].Type, bulkUpdate.ItemData[0].AssetID, | 1440 | bulkUpdate.ItemData[0].Type, bulkUpdate.ItemData[0].AssetID, |
@@ -1461,25 +1461,25 @@ namespace OpenSim.Region.ClientStack | |||
1461 | InventoryReply.AgentData.SimApproved = true; | 1461 | InventoryReply.AgentData.SimApproved = true; |
1462 | InventoryReply.InventoryData = new UpdateCreateInventoryItemPacket.InventoryDataBlock[1]; | 1462 | InventoryReply.InventoryData = new UpdateCreateInventoryItemPacket.InventoryDataBlock[1]; |
1463 | InventoryReply.InventoryData[0] = new UpdateCreateInventoryItemPacket.InventoryDataBlock(); | 1463 | InventoryReply.InventoryData[0] = new UpdateCreateInventoryItemPacket.InventoryDataBlock(); |
1464 | InventoryReply.InventoryData[0].ItemID = Item.inventoryID; | 1464 | InventoryReply.InventoryData[0].ItemID = Item.ID; |
1465 | InventoryReply.InventoryData[0].AssetID = Item.assetID; | 1465 | InventoryReply.InventoryData[0].AssetID = Item.AssetID; |
1466 | InventoryReply.InventoryData[0].CreatorID = Item.creatorsID; | 1466 | InventoryReply.InventoryData[0].CreatorID = Item.Creator; |
1467 | InventoryReply.InventoryData[0].BaseMask = Item.inventoryBasePermissions; | 1467 | InventoryReply.InventoryData[0].BaseMask = Item.BasePermissions; |
1468 | InventoryReply.InventoryData[0].CreationDate = 1000; | 1468 | InventoryReply.InventoryData[0].CreationDate = 1000; |
1469 | InventoryReply.InventoryData[0].Description = Helpers.StringToField(Item.inventoryDescription); | 1469 | InventoryReply.InventoryData[0].Description = Helpers.StringToField(Item.Description); |
1470 | InventoryReply.InventoryData[0].EveryoneMask = Item.inventoryEveryOnePermissions; | 1470 | InventoryReply.InventoryData[0].EveryoneMask = Item.EveryOnePermissions; |
1471 | InventoryReply.InventoryData[0].Flags = 0; | 1471 | InventoryReply.InventoryData[0].Flags = 0; |
1472 | InventoryReply.InventoryData[0].FolderID = Item.parentFolderID; | 1472 | InventoryReply.InventoryData[0].FolderID = Item.Folder; |
1473 | InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); | 1473 | InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); |
1474 | InventoryReply.InventoryData[0].GroupMask = 0; | 1474 | InventoryReply.InventoryData[0].GroupMask = 0; |
1475 | InventoryReply.InventoryData[0].InvType = (sbyte)Item.invType; | 1475 | InventoryReply.InventoryData[0].InvType = (sbyte)Item.InvType; |
1476 | InventoryReply.InventoryData[0].Name = Helpers.StringToField(Item.inventoryName); | 1476 | InventoryReply.InventoryData[0].Name = Helpers.StringToField(Item.Name); |
1477 | InventoryReply.InventoryData[0].NextOwnerMask = Item.inventoryNextPermissions; | 1477 | InventoryReply.InventoryData[0].NextOwnerMask = Item.NextPermissions; |
1478 | InventoryReply.InventoryData[0].OwnerID = Item.avatarID; | 1478 | InventoryReply.InventoryData[0].OwnerID = Item.Owner; |
1479 | InventoryReply.InventoryData[0].OwnerMask = Item.inventoryCurrentPermissions; | 1479 | InventoryReply.InventoryData[0].OwnerMask = Item.CurrentPermissions; |
1480 | InventoryReply.InventoryData[0].SalePrice = 100; | 1480 | InventoryReply.InventoryData[0].SalePrice = 100; |
1481 | InventoryReply.InventoryData[0].SaleType = 0; | 1481 | InventoryReply.InventoryData[0].SaleType = 0; |
1482 | InventoryReply.InventoryData[0].Type = (sbyte)Item.assetType; | 1482 | InventoryReply.InventoryData[0].Type = (sbyte)Item.AssetType; |
1483 | InventoryReply.InventoryData[0].CRC = | 1483 | InventoryReply.InventoryData[0].CRC = |
1484 | Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, | 1484 | Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, |
1485 | InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, | 1485 | InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, |
diff --git a/OpenSim/Region/Environment/Modules/AgentAssetTransactionModule.cs b/OpenSim/Region/Environment/Modules/AgentAssetTransactionModule.cs index 0789b3c..7ae3eba 100644 --- a/OpenSim/Region/Environment/Modules/AgentAssetTransactionModule.cs +++ b/OpenSim/Region/Environment/Modules/AgentAssetTransactionModule.cs | |||
@@ -232,7 +232,7 @@ namespace OpenSim.Region.Environment.Modules | |||
232 | { | 232 | { |
233 | m_log.DebugFormat( | 233 | m_log.DebugFormat( |
234 | "[TRANSACTIONS MANAGER] Called HandleItemUpdateFromTransaction with item {0}", | 234 | "[TRANSACTIONS MANAGER] Called HandleItemUpdateFromTransaction with item {0}", |
235 | item.inventoryName); | 235 | item.Name); |
236 | 236 | ||
237 | AgentAssetTransactions transactions | 237 | AgentAssetTransactions transactions |
238 | = GetUserTransactions(remoteClient.AgentId); | 238 | = GetUserTransactions(remoteClient.AgentId); |
diff --git a/OpenSim/Region/Environment/Modules/AgentAssetsTransactions.cs b/OpenSim/Region/Environment/Modules/AgentAssetsTransactions.cs index caba071..4d2ec5b 100644 --- a/OpenSim/Region/Environment/Modules/AgentAssetsTransactions.cs +++ b/OpenSim/Region/Environment/Modules/AgentAssetsTransactions.cs | |||
@@ -342,7 +342,7 @@ namespace OpenSim.Region.Environment.Modules | |||
342 | 342 | ||
343 | AssetBase asset | 343 | AssetBase asset |
344 | = m_userTransactions.Manager.MyScene.CommsManager.AssetCache.GetAsset( | 344 | = m_userTransactions.Manager.MyScene.CommsManager.AssetCache.GetAsset( |
345 | assetID, (item.assetType == (int) AssetType.Texture ? true : false)); | 345 | assetID, (item.AssetType == (int) AssetType.Texture ? true : false)); |
346 | 346 | ||
347 | if (asset == null) | 347 | if (asset == null) |
348 | { | 348 | { |
@@ -351,11 +351,11 @@ namespace OpenSim.Region.Environment.Modules | |||
351 | 351 | ||
352 | if (asset != null && asset.FullID == assetID) | 352 | if (asset != null && asset.FullID == assetID) |
353 | { | 353 | { |
354 | asset.Name = item.inventoryName; | 354 | asset.Name = item.Name; |
355 | asset.Description = item.inventoryDescription; | 355 | asset.Description = item.Description; |
356 | asset.InvType = (sbyte) item.invType; | 356 | asset.InvType = (sbyte) item.InvType; |
357 | asset.Type = (sbyte) item.assetType; | 357 | asset.Type = (sbyte) item.AssetType; |
358 | item.assetID = asset.FullID; | 358 | item.AssetID = asset.FullID; |
359 | 359 | ||
360 | m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(Asset); | 360 | m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(Asset); |
361 | } | 361 | } |
@@ -374,18 +374,18 @@ namespace OpenSim.Region.Environment.Modules | |||
374 | if (userInfo != null) | 374 | if (userInfo != null) |
375 | { | 375 | { |
376 | InventoryItemBase item = new InventoryItemBase(); | 376 | InventoryItemBase item = new InventoryItemBase(); |
377 | item.avatarID = ourClient.AgentId; | 377 | item.Owner = ourClient.AgentId; |
378 | item.creatorsID = ourClient.AgentId; | 378 | item.Creator = ourClient.AgentId; |
379 | item.inventoryID = LLUUID.Random(); | 379 | item.ID = LLUUID.Random(); |
380 | item.assetID = Asset.FullID; | 380 | item.AssetID = Asset.FullID; |
381 | item.inventoryDescription = m_description; | 381 | item.Description = m_description; |
382 | item.inventoryName = m_name; | 382 | item.Name = m_name; |
383 | item.assetType = type; | 383 | item.AssetType = type; |
384 | item.invType = invType; | 384 | item.InvType = invType; |
385 | item.parentFolderID = InventFolder; | 385 | item.Folder = InventFolder; |
386 | item.inventoryBasePermissions = 2147483647; | 386 | item.BasePermissions = 2147483647; |
387 | item.inventoryCurrentPermissions = 2147483647; | 387 | item.CurrentPermissions = 2147483647; |
388 | item.inventoryNextPermissions = nextPerm; | 388 | item.NextPermissions = nextPerm; |
389 | 389 | ||
390 | userInfo.AddItem(ourClient.AgentId, item); | 390 | userInfo.AddItem(ourClient.AgentId, item); |
391 | ourClient.SendInventoryItemCreateUpdate(item); | 391 | ourClient.SendInventoryItemCreateUpdate(item); |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 7ef3285..052cb02 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -114,19 +114,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
114 | if (item != null) | 114 | if (item != null) |
115 | { | 115 | { |
116 | AssetBase asset = | 116 | AssetBase asset = |
117 | CreateAsset(item.inventoryName, item.inventoryDescription, (sbyte) item.invType, | 117 | CreateAsset(item.Name, item.Description, (sbyte) item.InvType, |
118 | (sbyte) item.assetType, data); | 118 | (sbyte) item.AssetType, data); |
119 | AssetCache.AddAsset(asset); | 119 | AssetCache.AddAsset(asset); |
120 | 120 | ||
121 | item.assetID = asset.FullID; | 121 | item.AssetID = asset.FullID; |
122 | userInfo.UpdateItem(remoteClient.AgentId, item); | 122 | userInfo.UpdateItem(remoteClient.AgentId, item); |
123 | 123 | ||
124 | // remoteClient.SendInventoryItemCreateUpdate(item); | 124 | // remoteClient.SendInventoryItemCreateUpdate(item); |
125 | if ((InventoryType) item.invType == InventoryType.Notecard) | 125 | if ((InventoryType) item.InvType == InventoryType.Notecard) |
126 | { | 126 | { |
127 | //do we want to know about updated note cards? | 127 | //do we want to know about updated note cards? |
128 | } | 128 | } |
129 | else if ((InventoryType) item.invType == InventoryType.LSL) | 129 | else if ((InventoryType) item.InvType == InventoryType.LSL) |
130 | { | 130 | { |
131 | // do we want to know about updated scripts | 131 | // do we want to know about updated scripts |
132 | } | 132 | } |
@@ -258,9 +258,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
258 | { | 258 | { |
259 | if (LLUUID.Zero == transactionID) | 259 | if (LLUUID.Zero == transactionID) |
260 | { | 260 | { |
261 | item.inventoryName = name; | 261 | item.Name = name; |
262 | item.inventoryDescription = description; | 262 | item.Description = description; |
263 | item.inventoryNextPermissions = nextOwnerMask; | 263 | item.NextPermissions = nextOwnerMask; |
264 | 264 | ||
265 | userInfo.UpdateItem(remoteClient.AgentId, item); | 265 | userInfo.UpdateItem(remoteClient.AgentId, item); |
266 | } | 266 | } |
@@ -319,20 +319,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
319 | { | 319 | { |
320 | // Insert a copy of the item into the recipient | 320 | // Insert a copy of the item into the recipient |
321 | InventoryItemBase itemCopy = new InventoryItemBase(); | 321 | InventoryItemBase itemCopy = new InventoryItemBase(); |
322 | itemCopy.avatarID = recipientClient.AgentId; | 322 | itemCopy.Owner = recipientClient.AgentId; |
323 | itemCopy.creatorsID = senderId; | 323 | itemCopy.Creator = senderId; |
324 | itemCopy.inventoryID = LLUUID.Random(); | 324 | itemCopy.ID = LLUUID.Random(); |
325 | itemCopy.assetID = item.assetID; | 325 | itemCopy.AssetID = item.AssetID; |
326 | itemCopy.inventoryDescription = item.inventoryDescription; | 326 | itemCopy.Description = item.Description; |
327 | itemCopy.inventoryName = item.inventoryName; | 327 | itemCopy.Name = item.Name; |
328 | itemCopy.assetType = item.assetType; | 328 | itemCopy.AssetType = item.AssetType; |
329 | itemCopy.invType = item.invType; | 329 | itemCopy.InvType = item.InvType; |
330 | itemCopy.parentFolderID = recipientUserInfo.RootFolder.folderID; | 330 | itemCopy.Folder = recipientUserInfo.RootFolder.folderID; |
331 | itemCopy.inventoryCurrentPermissions = 2147483647; | 331 | itemCopy.CurrentPermissions = 2147483647; |
332 | itemCopy.inventoryNextPermissions = 2147483647; | 332 | itemCopy.NextPermissions = 2147483647; |
333 | itemCopy.inventoryEveryOnePermissions = item.inventoryEveryOnePermissions; | 333 | itemCopy.EveryOnePermissions = item.EveryOnePermissions; |
334 | itemCopy.inventoryBasePermissions = item.inventoryBasePermissions; | 334 | itemCopy.BasePermissions = item.BasePermissions; |
335 | itemCopy.inventoryCurrentPermissions = item.inventoryCurrentPermissions; | 335 | itemCopy.CurrentPermissions = item.CurrentPermissions; |
336 | 336 | ||
337 | recipientUserInfo.AddItem(recipientClient.AgentId, itemCopy); | 337 | recipientUserInfo.AddItem(recipientClient.AgentId, itemCopy); |
338 | 338 | ||
@@ -343,8 +343,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
343 | { | 343 | { |
344 | m_log.ErrorFormat( | 344 | m_log.ErrorFormat( |
345 | "[AGENT INVENTORY]: Could not find userinfo for recipient user {0}, {1} of item {2}, {3} from {4}", | 345 | "[AGENT INVENTORY]: Could not find userinfo for recipient user {0}, {1} of item {2}, {3} from {4}", |
346 | recipientClient.Name, recipientClient.AgentId, item.inventoryName, | 346 | recipientClient.Name, recipientClient.AgentId, item.Name, |
347 | item.inventoryID, senderId); | 347 | item.ID, senderId); |
348 | } | 348 | } |
349 | } | 349 | } |
350 | else | 350 | else |
@@ -397,19 +397,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
397 | 397 | ||
398 | AssetBase asset | 398 | AssetBase asset |
399 | = AssetCache.GetAsset( | 399 | = AssetCache.GetAsset( |
400 | item.assetID, (item.assetType == (int)AssetType.Texture ? true : false)); | 400 | item.AssetID, (item.AssetType == (int)AssetType.Texture ? true : false)); |
401 | 401 | ||
402 | if (asset != null) | 402 | if (asset != null) |
403 | { | 403 | { |
404 | // TODO: preserve current permissions? | 404 | // TODO: preserve current permissions? |
405 | CreateNewInventoryItem( | 405 | CreateNewInventoryItem( |
406 | remoteClient, newFolderID, callbackID, asset, item.inventoryNextPermissions); | 406 | remoteClient, newFolderID, callbackID, asset, item.NextPermissions); |
407 | } | 407 | } |
408 | else | 408 | else |
409 | { | 409 | { |
410 | m_log.ErrorFormat( | 410 | m_log.ErrorFormat( |
411 | "[AGENT INVENTORY]: Could not copy item {0} since asset {1} could not be found", | 411 | "[AGENT INVENTORY]: Could not copy item {0} since asset {1} could not be found", |
412 | item.inventoryName, item.assetID); | 412 | item.Name, item.AssetID); |
413 | } | 413 | } |
414 | } | 414 | } |
415 | 415 | ||
@@ -445,9 +445,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
445 | { | 445 | { |
446 | if (newName != System.String.Empty) | 446 | if (newName != System.String.Empty) |
447 | { | 447 | { |
448 | item.inventoryName = newName; | 448 | item.Name = newName; |
449 | } | 449 | } |
450 | item.parentFolderID = folderID; | 450 | item.Folder = folderID; |
451 | userInfo.DeleteItem(remoteClient.AgentId, item); | 451 | userInfo.DeleteItem(remoteClient.AgentId, item); |
452 | 452 | ||
453 | // TODO: preserve current permissions? | 453 | // TODO: preserve current permissions? |
@@ -483,17 +483,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
483 | if (userInfo != null) | 483 | if (userInfo != null) |
484 | { | 484 | { |
485 | InventoryItemBase item = new InventoryItemBase(); | 485 | InventoryItemBase item = new InventoryItemBase(); |
486 | item.avatarID = remoteClient.AgentId; | 486 | item.Owner = remoteClient.AgentId; |
487 | item.creatorsID = remoteClient.AgentId; | 487 | item.Creator = remoteClient.AgentId; |
488 | item.inventoryID = LLUUID.Random(); | 488 | item.ID = LLUUID.Random(); |
489 | item.assetID = asset.FullID; | 489 | item.AssetID = asset.FullID; |
490 | item.inventoryDescription = asset.Description; | 490 | item.Description = asset.Description; |
491 | item.inventoryName = asset.Name; | 491 | item.Name = asset.Name; |
492 | item.assetType = asset.Type; | 492 | item.AssetType = asset.Type; |
493 | item.invType = asset.InvType; | 493 | item.InvType = asset.InvType; |
494 | item.parentFolderID = folderID; | 494 | item.Folder = folderID; |
495 | item.inventoryCurrentPermissions = 2147483647; | 495 | item.CurrentPermissions = 2147483647; |
496 | item.inventoryNextPermissions = nextOwnerMask; | 496 | item.NextPermissions = nextOwnerMask; |
497 | 497 | ||
498 | userInfo.AddItem(remoteClient.AgentId, item); | 498 | userInfo.AddItem(remoteClient.AgentId, item); |
499 | remoteClient.SendInventoryItemCreateUpdate(item); | 499 | remoteClient.SendInventoryItemCreateUpdate(item); |
@@ -708,12 +708,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
708 | 708 | ||
709 | if (item != null) | 709 | if (item != null) |
710 | { | 710 | { |
711 | if (item.assetType == 0 || item.assetType == 1 || item.assetType == 10) | 711 | if (item.AssetType == 0 || item.AssetType == 1 || item.AssetType == 10) |
712 | { | 712 | { |
713 | group.AddInventoryItem(remoteClient, primLocalID, item, copyID); | 713 | group.AddInventoryItem(remoteClient, primLocalID, item, copyID); |
714 | m_log.InfoFormat( | 714 | m_log.InfoFormat( |
715 | "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}", | 715 | "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}", |
716 | item.inventoryName, primLocalID, remoteClient.Name); | 716 | item.Name, primLocalID, remoteClient.Name); |
717 | group.GetProperties(remoteClient); | 717 | group.GetProperties(remoteClient); |
718 | } | 718 | } |
719 | else | 719 | else |
@@ -725,7 +725,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
725 | // nasty way it is done to be changed). | 725 | // nasty way it is done to be changed). |
726 | m_log.WarnFormat( | 726 | m_log.WarnFormat( |
727 | "[PRIM INVENTORY]: Sorry, prim inventory storage of asset type {0} is not yet supported", | 727 | "[PRIM INVENTORY]: Sorry, prim inventory storage of asset type {0} is not yet supported", |
728 | item.assetType); | 728 | item.AssetType); |
729 | } | 729 | } |
730 | } | 730 | } |
731 | else | 731 | else |
@@ -790,7 +790,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
790 | "[PRIM INVENTORY]: " + | 790 | "[PRIM INVENTORY]: " + |
791 | "Could not rez script {0} into prim local ID {1} for user {2}" | 791 | "Could not rez script {0} into prim local ID {1} for user {2}" |
792 | + " because the prim could not be found in the region!", | 792 | + " because the prim could not be found in the region!", |
793 | item.inventoryName, localID, remoteClient.Name); | 793 | item.Name, localID, remoteClient.Name); |
794 | } | 794 | } |
795 | } | 795 | } |
796 | else | 796 | else |
@@ -863,21 +863,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
863 | AssetCache.AddAsset(asset); | 863 | AssetCache.AddAsset(asset); |
864 | 864 | ||
865 | InventoryItemBase item = new InventoryItemBase(); | 865 | InventoryItemBase item = new InventoryItemBase(); |
866 | item.avatarID = remoteClient.AgentId; | 866 | item.Owner = remoteClient.AgentId; |
867 | item.creatorsID = remoteClient.AgentId; | 867 | item.Creator = remoteClient.AgentId; |
868 | item.inventoryID = LLUUID.Random(); | 868 | item.ID = LLUUID.Random(); |
869 | item.assetID = asset.FullID; | 869 | item.AssetID = asset.FullID; |
870 | item.inventoryDescription = asset.Description; | 870 | item.Description = asset.Description; |
871 | item.inventoryName = asset.Name; | 871 | item.Name = asset.Name; |
872 | item.assetType = asset.Type; | 872 | item.AssetType = asset.Type; |
873 | item.invType = asset.InvType; | 873 | item.InvType = asset.InvType; |
874 | item.parentFolderID = DeRezPacket.AgentBlock.DestinationID; | 874 | item.Folder = DeRezPacket.AgentBlock.DestinationID; |
875 | item.inventoryCurrentPermissions = 2147483647; | 875 | item.CurrentPermissions = 2147483647; |
876 | item.inventoryNextPermissions = 2147483647; | 876 | item.NextPermissions = 2147483647; |
877 | item.inventoryEveryOnePermissions = | 877 | item.EveryOnePermissions = |
878 | ((SceneObjectGroup) selectedEnt).RootPart.EveryoneMask; | 878 | ((SceneObjectGroup) selectedEnt).RootPart.EveryoneMask; |
879 | item.inventoryBasePermissions = ((SceneObjectGroup) selectedEnt).RootPart.BaseMask; | 879 | item.BasePermissions = ((SceneObjectGroup) selectedEnt).RootPart.BaseMask; |
880 | item.inventoryCurrentPermissions = ((SceneObjectGroup) selectedEnt).RootPart.OwnerMask; | 880 | item.CurrentPermissions = ((SceneObjectGroup) selectedEnt).RootPart.OwnerMask; |
881 | 881 | ||
882 | userInfo.AddItem(remoteClient.AgentId, item); | 882 | userInfo.AddItem(remoteClient.AgentId, item); |
883 | remoteClient.SendInventoryItemCreateUpdate(item); | 883 | remoteClient.SendInventoryItemCreateUpdate(item); |
@@ -942,7 +942,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
942 | InventoryItemBase item = userInfo.RootFolder.HasItem(itemID); | 942 | InventoryItemBase item = userInfo.RootFolder.HasItem(itemID); |
943 | if (item != null) | 943 | if (item != null) |
944 | { | 944 | { |
945 | AssetBase rezAsset = AssetCache.GetAsset(item.assetID, false); | 945 | AssetBase rezAsset = AssetCache.GetAsset(item.AssetID, false); |
946 | 946 | ||
947 | if (rezAsset != null) | 947 | if (rezAsset != null) |
948 | { | 948 | { |
@@ -956,8 +956,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
956 | // Since renaming the item in the inventory does not affect the name stored | 956 | // Since renaming the item in the inventory does not affect the name stored |
957 | // in the serialization, transfer the correct name from the inventory to the | 957 | // in the serialization, transfer the correct name from the inventory to the |
958 | // object itself before we rez. | 958 | // object itself before we rez. |
959 | rootPart.Name = item.inventoryName; | 959 | rootPart.Name = item.Name; |
960 | rootPart.Description = item.inventoryDescription; | 960 | rootPart.Description = item.Description; |
961 | 961 | ||
962 | rootPart.TrimPermissions(); | 962 | rootPart.TrimPermissions(); |
963 | group.ApplyPhysics(m_physicalPrim); | 963 | group.ApplyPhysics(m_physicalPrim); |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs index a450a3d..3f14fff 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -178,7 +178,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
178 | public bool AddInventoryItem(IClientAPI remoteClient, uint localID, | 178 | public bool AddInventoryItem(IClientAPI remoteClient, uint localID, |
179 | InventoryItemBase item, LLUUID copyItemID) | 179 | InventoryItemBase item, LLUUID copyItemID) |
180 | { | 180 | { |
181 | LLUUID newItemId = (copyItemID != LLUUID.Zero) ? copyItemID : item.inventoryID; | 181 | LLUUID newItemId = (copyItemID != LLUUID.Zero) ? copyItemID : item.ID; |
182 | 182 | ||
183 | SceneObjectPart part = GetChildPart(localID); | 183 | SceneObjectPart part = GetChildPart(localID); |
184 | if (part != null) | 184 | if (part != null) |
@@ -186,13 +186,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
186 | TaskInventoryItem taskItem = new TaskInventoryItem(); | 186 | TaskInventoryItem taskItem = new TaskInventoryItem(); |
187 | 187 | ||
188 | taskItem.ItemID = newItemId; | 188 | taskItem.ItemID = newItemId; |
189 | taskItem.AssetID = item.assetID; | 189 | taskItem.AssetID = item.AssetID; |
190 | taskItem.Name = item.inventoryName; | 190 | taskItem.Name = item.Name; |
191 | taskItem.Description = item.inventoryDescription; | 191 | taskItem.Description = item.Description; |
192 | taskItem.OwnerID = item.avatarID; | 192 | taskItem.OwnerID = item.Owner; |
193 | taskItem.CreatorID = item.creatorsID; | 193 | taskItem.CreatorID = item.Creator; |
194 | taskItem.Type = item.assetType; | 194 | taskItem.Type = item.AssetType; |
195 | taskItem.InvType = item.invType; | 195 | taskItem.InvType = item.InvType; |
196 | part.AddInventoryItem(taskItem); | 196 | part.AddInventoryItem(taskItem); |
197 | 197 | ||
198 | return true; | 198 | return true; |
diff --git a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs index f413fb9..ae522ef 100644 --- a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -303,7 +303,7 @@ namespace OpenSim.Region.Modules.AvatarFactory | |||
303 | InventoryItemBase baseItem = profile.RootFolder.HasItem(wear.ItemID); | 303 | InventoryItemBase baseItem = profile.RootFolder.HasItem(wear.ItemID); |
304 | if (baseItem != null) | 304 | if (baseItem != null) |
305 | { | 305 | { |
306 | assetId = baseItem.assetID; | 306 | assetId = baseItem.AssetID; |
307 | avatAppearance.Wearables[wear.Type].AssetID = assetId; | 307 | avatAppearance.Wearables[wear.Type].AssetID = assetId; |
308 | avatAppearance.Wearables[wear.Type].ItemID = wear.ItemID; | 308 | avatAppearance.Wearables[wear.Type].ItemID = wear.ItemID; |
309 | 309 | ||