aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/AgentAssetTransactionModule.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/AgentAssetsTransactions.cs36
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs122
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs16
4 files changed, 88 insertions, 88 deletions
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;