diff options
author | Sean Dague | 2008-04-07 23:15:35 +0000 |
---|---|---|
committer | Sean Dague | 2008-04-07 23:15:35 +0000 |
commit | f43681510725f5b95fcb864a1f3e4b744fcaf992 (patch) | |
tree | 2d34caa75488d1c608d1a21b4888cb0f264a6cba /OpenSim/Region | |
parent | needed to add 4 characters to support the dashes (diff) | |
download | opensim-SC-f43681510725f5b95fcb864a1f3e4b744fcaf992.zip opensim-SC-f43681510725f5b95fcb864a1f3e4b744fcaf992.tar.gz opensim-SC-f43681510725f5b95fcb864a1f3e4b744fcaf992.tar.bz2 opensim-SC-f43681510725f5b95fcb864a1f3e4b744fcaf992.tar.xz |
Refactor InventoryItemBase to do the following:
* wrap fields as Properties
* rename some fields/properties to more sensible names
* set style to PropName to match more standard C# approach
Diffstat (limited to 'OpenSim/Region')
6 files changed, 142 insertions, 142 deletions
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 | ||