aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs202
1 files changed, 101 insertions, 101 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index ab580ae..cdd6943 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -30,8 +30,8 @@ using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Text; 31using System.Text;
32using System.Timers; 32using System.Timers;
33using libsecondlife; 33using OpenMetaverse;
34using libsecondlife.Packets; 34using OpenMetaverse.Packets;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Framework.Communications.Cache; 37using OpenSim.Framework.Communications.Cache;
@@ -46,7 +46,7 @@ namespace OpenSim.Region.Environment.Scenes
46 public EntityBase selectedEnt; 46 public EntityBase selectedEnt;
47 public IClientAPI remoteClient; 47 public IClientAPI remoteClient;
48 public SceneObjectGroup objectGroup; 48 public SceneObjectGroup objectGroup;
49 public LLUUID folderID; 49 public UUID folderID;
50 public bool permissionToDelete; 50 public bool permissionToDelete;
51 } 51 }
52 52
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Environment.Scenes
74 } 74 }
75 } 75 }
76 76
77 public void AddUploadedInventoryItem(LLUUID agentID, InventoryItemBase item) 77 public void AddUploadedInventoryItem(UUID agentID, InventoryItemBase item)
78 { 78 {
79 IMoneyModule money=RequestModuleInterface<IMoneyModule>(); 79 IMoneyModule money=RequestModuleInterface<IMoneyModule>();
80 if (money != null) 80 if (money != null)
@@ -85,7 +85,7 @@ namespace OpenSim.Region.Environment.Scenes
85 AddInventoryItem(agentID, item); 85 AddInventoryItem(agentID, item);
86 } 86 }
87 87
88 public bool AddInventoryItemReturned(LLUUID AgentId, InventoryItemBase item) 88 public bool AddInventoryItemReturned(UUID AgentId, InventoryItemBase item)
89 { 89 {
90 CachedUserInfo userInfo 90 CachedUserInfo userInfo
91 = CommsManager.UserProfileCacheService.GetUserDetails(AgentId); 91 = CommsManager.UserProfileCacheService.GetUserDetails(AgentId);
@@ -103,7 +103,7 @@ namespace OpenSim.Region.Environment.Scenes
103 } 103 }
104 } 104 }
105 105
106 public void AddInventoryItem(LLUUID AgentID, InventoryItemBase item) 106 public void AddInventoryItem(UUID AgentID, InventoryItemBase item)
107 { 107 {
108 CachedUserInfo userInfo 108 CachedUserInfo userInfo
109 = CommsManager.UserProfileCacheService.GetUserDetails(AgentID); 109 = CommsManager.UserProfileCacheService.GetUserDetails(AgentID);
@@ -160,7 +160,7 @@ namespace OpenSim.Region.Environment.Scenes
160 /// <param name="itemID"></param> 160 /// <param name="itemID"></param>
161 /// <param name="data"></param> 161 /// <param name="data"></param>
162 /// <returns></returns> 162 /// <returns></returns>
163 public LLUUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID itemID, byte[] data) 163 public UUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, UUID itemID, byte[] data)
164 { 164 {
165 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 165 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
166 if (userInfo != null) 166 if (userInfo != null)
@@ -192,13 +192,13 @@ namespace OpenSim.Region.Environment.Scenes
192 } 192 }
193 } 193 }
194 } 194 }
195 return LLUUID.Zero; 195 return UUID.Zero;
196 } 196 }
197 197
198 /// <summary> 198 /// <summary>
199 /// <see>CapsUpdatedInventoryItemAsset(IClientAPI, LLUUID, byte[])</see> 199 /// <see>CapsUpdatedInventoryItemAsset(IClientAPI, UUID, byte[])</see>
200 /// </summary> 200 /// </summary>
201 private LLUUID CapsUpdateInventoryItemAsset(LLUUID avatarId, LLUUID itemID, byte[] data) 201 private UUID CapsUpdateInventoryItemAsset(UUID avatarId, UUID itemID, byte[] data)
202 { 202 {
203 ScenePresence avatar; 203 ScenePresence avatar;
204 204
@@ -214,7 +214,7 @@ namespace OpenSim.Region.Environment.Scenes
214 avatarId); 214 avatarId);
215 } 215 }
216 216
217 return LLUUID.Zero; 217 return UUID.Zero;
218 } 218 }
219 219
220 /// <summary> 220 /// <summary>
@@ -225,8 +225,8 @@ namespace OpenSim.Region.Environment.Scenes
225 /// <param name="primID">The prim which contains the item to update</param> 225 /// <param name="primID">The prim which contains the item to update</param>
226 /// <param name="isScriptRunning">Indicates whether the script to update is currently running</param> 226 /// <param name="isScriptRunning">Indicates whether the script to update is currently running</param>
227 /// <param name="data"></param> 227 /// <param name="data"></param>
228 public void CapsUpdateTaskInventoryScriptAsset(IClientAPI remoteClient, LLUUID itemId, 228 public void CapsUpdateTaskInventoryScriptAsset(IClientAPI remoteClient, UUID itemId,
229 LLUUID primId, bool isScriptRunning, byte[] data) 229 UUID primId, bool isScriptRunning, byte[] data)
230 { 230 {
231 // Retrieve group 231 // Retrieve group
232 SceneObjectPart part = GetSceneObjectPart(primId); 232 SceneObjectPart part = GetSceneObjectPart(primId);
@@ -274,10 +274,10 @@ namespace OpenSim.Region.Environment.Scenes
274 } 274 }
275 275
276 /// <summary> 276 /// <summary>
277 /// <see>CapsUpdateTaskInventoryScriptAsset(IClientAPI, LLUUID, LLUUID, bool, byte[])</see> 277 /// <see>CapsUpdateTaskInventoryScriptAsset(IClientAPI, UUID, UUID, bool, byte[])</see>
278 /// </summary> 278 /// </summary>
279 private void CapsUpdateTaskInventoryScriptAsset(LLUUID avatarId, LLUUID itemId, 279 private void CapsUpdateTaskInventoryScriptAsset(UUID avatarId, UUID itemId,
280 LLUUID primId, bool isScriptRunning, byte[] data) 280 UUID primId, bool isScriptRunning, byte[] data)
281 { 281 {
282 ScenePresence avatar; 282 ScenePresence avatar;
283 283
@@ -300,17 +300,17 @@ namespace OpenSim.Region.Environment.Scenes
300 /// a transaction 300 /// a transaction
301 /// </summary> 301 /// </summary>
302 /// <param name="remoteClient"></param> 302 /// <param name="remoteClient"></param>
303 /// <param name="transactionID">The transaction ID. If this is LLUUID.Zero we will 303 /// <param name="transactionID">The transaction ID. If this is UUID.Zero we will
304 /// assume that we are not in a transaction</param> 304 /// assume that we are not in a transaction</param>
305 /// <param name="itemID">The ID of the updated item</param> 305 /// <param name="itemID">The ID of the updated item</param>
306 /// <param name="name">The name of the updated item</param> 306 /// <param name="name">The name of the updated item</param>
307 /// <param name="description">The description of the updated item</param> 307 /// <param name="description">The description of the updated item</param>
308 /// <param name="nextOwnerMask">The permissions of the updated item</param> 308 /// <param name="nextOwnerMask">The permissions of the updated item</param>
309/* public void UpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID transactionID, 309/* public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID,
310 LLUUID itemID, string name, string description, 310 UUID itemID, string name, string description,
311 uint nextOwnerMask)*/ 311 uint nextOwnerMask)*/
312 public void UpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID transactionID, 312 public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID,
313 LLUUID itemID, InventoryItemBase itemUpd) 313 UUID itemID, InventoryItemBase itemUpd)
314 { 314 {
315 CachedUserInfo userInfo 315 CachedUserInfo userInfo
316 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 316 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
@@ -321,7 +321,7 @@ namespace OpenSim.Region.Environment.Scenes
321 321
322 if (item != null) 322 if (item != null)
323 { 323 {
324 if (LLUUID.Zero == transactionID) 324 if (UUID.Zero == transactionID)
325 { 325 {
326 item.Name = itemUpd.Name; 326 item.Name = itemUpd.Name;
327 item.Description = itemUpd.Description; 327 item.Description = itemUpd.Description;
@@ -378,7 +378,7 @@ namespace OpenSim.Region.Environment.Scenes
378 /// <param name="recipientClient"></param> 378 /// <param name="recipientClient"></param>
379 /// <param name="senderId">ID of the sender of the item</param> 379 /// <param name="senderId">ID of the sender of the item</param>
380 /// <param name="itemId"></param> 380 /// <param name="itemId"></param>
381 public void GiveInventoryItem(IClientAPI recipientClient, LLUUID senderId, LLUUID itemId) 381 public void GiveInventoryItem(IClientAPI recipientClient, UUID senderId, UUID itemId)
382 { 382 {
383 // Retrieve the item from the sender 383 // Retrieve the item from the sender
384 CachedUserInfo senderUserInfo = CommsManager.UserProfileCacheService.GetUserDetails(senderId); 384 CachedUserInfo senderUserInfo = CommsManager.UserProfileCacheService.GetUserDetails(senderId);
@@ -413,13 +413,13 @@ namespace OpenSim.Region.Environment.Scenes
413 InventoryItemBase itemCopy = new InventoryItemBase(); 413 InventoryItemBase itemCopy = new InventoryItemBase();
414 itemCopy.Owner = recipientClient.AgentId; 414 itemCopy.Owner = recipientClient.AgentId;
415 itemCopy.Creator = senderId; 415 itemCopy.Creator = senderId;
416 itemCopy.ID = LLUUID.Random(); 416 itemCopy.ID = UUID.Random();
417 itemCopy.AssetID = item.AssetID; 417 itemCopy.AssetID = item.AssetID;
418 itemCopy.Description = item.Description; 418 itemCopy.Description = item.Description;
419 itemCopy.Name = item.Name; 419 itemCopy.Name = item.Name;
420 itemCopy.AssetType = item.AssetType; 420 itemCopy.AssetType = item.AssetType;
421 itemCopy.InvType = item.InvType; 421 itemCopy.InvType = item.InvType;
422 itemCopy.Folder = LLUUID.Zero; 422 itemCopy.Folder = UUID.Zero;
423 if (ExternalChecks.ExternalChecksPropagatePermissions()) 423 if (ExternalChecks.ExternalChecksPropagatePermissions())
424 { 424 {
425 if (item.InvType == 6) 425 if (item.InvType == 6)
@@ -493,8 +493,8 @@ namespace OpenSim.Region.Environment.Scenes
493 } 493 }
494 } 494 }
495 495
496 public void CopyInventoryItem(IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, 496 public void CopyInventoryItem(IClientAPI remoteClient, uint callbackID, UUID oldAgentID, UUID oldItemID,
497 LLUUID newFolderID, string newName) 497 UUID newFolderID, string newName)
498 { 498 {
499 m_log.DebugFormat( 499 m_log.DebugFormat(
500 "[AGENT INVENTORY]: CopyInventoryItem received by {0} with oldAgentID {1}, oldItemID {2}, new FolderID {3}, newName {4}", 500 "[AGENT INVENTORY]: CopyInventoryItem received by {0} with oldAgentID {1}, oldItemID {2}, new FolderID {3}, newName {4}",
@@ -579,7 +579,7 @@ namespace OpenSim.Region.Environment.Scenes
579 asset.Name = name; 579 asset.Name = name;
580 asset.Description = description; 580 asset.Description = description;
581 asset.Type = assetType; 581 asset.Type = assetType;
582 asset.FullID = LLUUID.Random(); 582 asset.FullID = UUID.Random();
583 asset.Data = (data == null) ? new byte[1] : data; 583 asset.Data = (data == null) ? new byte[1] : data;
584 584
585 return asset; 585 return asset;
@@ -593,7 +593,7 @@ namespace OpenSim.Region.Environment.Scenes
593 /// <param name="itemID"></param> 593 /// <param name="itemID"></param>
594 /// <param name="length"></param> 594 /// <param name="length"></param>
595 /// <param name="newName"></param> 595 /// <param name="newName"></param>
596 public void MoveInventoryItem(IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length, 596 public void MoveInventoryItem(IClientAPI remoteClient, UUID folderID, UUID itemID, int length,
597 string newName) 597 string newName)
598 { 598 {
599 m_log.DebugFormat( 599 m_log.DebugFormat(
@@ -648,7 +648,7 @@ namespace OpenSim.Region.Environment.Scenes
648 /// <param name="asset"></param> 648 /// <param name="asset"></param>
649 /// <param name="invType"></param> 649 /// <param name="invType"></param>
650 /// <param name="nextOwnerMask"></param> 650 /// <param name="nextOwnerMask"></param>
651 private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, string name, uint flags, uint callbackID, 651 private void CreateNewInventoryItem(IClientAPI remoteClient, UUID folderID, string name, uint flags, uint callbackID,
652 AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate) 652 AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate)
653 { 653 {
654 CreateNewInventoryItem( 654 CreateNewInventoryItem(
@@ -667,7 +667,7 @@ namespace OpenSim.Region.Environment.Scenes
667 /// <param name="nextOwnerMask"></param> 667 /// <param name="nextOwnerMask"></param>
668 /// <param name="creationDate"></param> 668 /// <param name="creationDate"></param>
669 private void CreateNewInventoryItem( 669 private void CreateNewInventoryItem(
670 IClientAPI remoteClient, LLUUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType, 670 IClientAPI remoteClient, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType,
671 uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, int creationDate) 671 uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, int creationDate)
672 { 672 {
673 CachedUserInfo userInfo 673 CachedUserInfo userInfo
@@ -678,7 +678,7 @@ namespace OpenSim.Region.Environment.Scenes
678 InventoryItemBase item = new InventoryItemBase(); 678 InventoryItemBase item = new InventoryItemBase();
679 item.Owner = remoteClient.AgentId; 679 item.Owner = remoteClient.AgentId;
680 item.Creator = remoteClient.AgentId; 680 item.Creator = remoteClient.AgentId;
681 item.ID = LLUUID.Random(); 681 item.ID = UUID.Random();
682 item.AssetID = asset.FullID; 682 item.AssetID = asset.FullID;
683 item.Description = asset.Description; 683 item.Description = asset.Description;
684 item.Name = name; 684 item.Name = name;
@@ -717,14 +717,14 @@ namespace OpenSim.Region.Environment.Scenes
717 /// <param name="type"></param> 717 /// <param name="type"></param>
718 /// <param name="wearableType"></param> 718 /// <param name="wearableType"></param>
719 /// <param name="nextOwnerMask"></param> 719 /// <param name="nextOwnerMask"></param>
720 public void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, 720 public void CreateNewInventoryItem(IClientAPI remoteClient, UUID transactionID, UUID folderID,
721 uint callbackID, string description, string name, sbyte invType, 721 uint callbackID, string description, string name, sbyte invType,
722 sbyte assetType, 722 sbyte assetType,
723 byte wearableType, uint nextOwnerMask, int creationDate) 723 byte wearableType, uint nextOwnerMask, int creationDate)
724 { 724 {
725// m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID); 725// m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID);
726 726
727 if (transactionID == LLUUID.Zero) 727 if (transactionID == UUID.Zero)
728 { 728 {
729 CachedUserInfo userInfo 729 CachedUserInfo userInfo
730 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 730 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
@@ -734,9 +734,9 @@ namespace OpenSim.Region.Environment.Scenes
734 ScenePresence presence; 734 ScenePresence presence;
735 TryGetAvatar(remoteClient.AgentId, out presence); 735 TryGetAvatar(remoteClient.AgentId, out presence);
736 byte[] data = null; 736 byte[] data = null;
737 if (invType == 3 && presence != null) // libsecondlife.asset.assettype.landmark = 3 - needs to be turned into an enum 737 if (invType == 3 && presence != null) // OpenMetaverse.asset.assettype.landmark = 3 - needs to be turned into an enum
738 { 738 {
739 LLVector3 pos=presence.AbsolutePosition; 739 Vector3 pos=presence.AbsolutePosition;
740 string strdata=String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n", 740 string strdata=String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n",
741 presence.Scene.RegionInfo.RegionID, 741 presence.Scene.RegionInfo.RegionID,
742 pos.X, pos.Y, pos.Z, 742 pos.X, pos.Y, pos.Z,
@@ -775,7 +775,7 @@ namespace OpenSim.Region.Environment.Scenes
775 /// </summary> 775 /// </summary>
776 /// <param name="remoteClient"></param> 776 /// <param name="remoteClient"></param>
777 /// <param name="itemID"></param> 777 /// <param name="itemID"></param>
778 private void RemoveInventoryItem(IClientAPI remoteClient, LLUUID itemID) 778 private void RemoveInventoryItem(IClientAPI remoteClient, UUID itemID)
779 { 779 {
780 CachedUserInfo userInfo 780 CachedUserInfo userInfo
781 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 781 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
@@ -798,7 +798,7 @@ namespace OpenSim.Region.Environment.Scenes
798 /// </summary> 798 /// </summary>
799 /// <param name="remoteClient"></param> 799 /// <param name="remoteClient"></param>
800 /// <param name="folderID"></param> 800 /// <param name="folderID"></param>
801 private void RemoveInventoryFolder(IClientAPI remoteClient, LLUUID folderID) 801 private void RemoveInventoryFolder(IClientAPI remoteClient, UUID folderID)
802 { 802 {
803 CachedUserInfo userInfo 803 CachedUserInfo userInfo
804 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 804 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
@@ -873,7 +873,7 @@ namespace OpenSim.Region.Environment.Scenes
873 /// be necessary for a permissions check at some stage.</param> 873 /// be necessary for a permissions check at some stage.</param>
874 /// <param name="itemID"></param> 874 /// <param name="itemID"></param>
875 /// <param name="localID"></param> 875 /// <param name="localID"></param>
876 public void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID) 876 public void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID)
877 { 877 {
878 SceneObjectPart part = GetSceneObjectPart(localID); 878 SceneObjectPart part = GetSceneObjectPart(localID);
879 SceneObjectGroup group = part.ParentGroup; 879 SceneObjectGroup group = part.ParentGroup;
@@ -896,7 +896,7 @@ namespace OpenSim.Region.Environment.Scenes
896 } 896 }
897 } 897 }
898 898
899 private InventoryItemBase CreateAgentInventoryItemFromTask(LLUUID destAgent, SceneObjectPart part, LLUUID itemId) 899 private InventoryItemBase CreateAgentInventoryItemFromTask(UUID destAgent, SceneObjectPart part, UUID itemId)
900 { 900 {
901 TaskInventoryItem taskItem = part.GetInventoryItem(itemId); 901 TaskInventoryItem taskItem = part.GetInventoryItem(itemId);
902 902
@@ -913,7 +913,7 @@ namespace OpenSim.Region.Environment.Scenes
913 913
914 InventoryItemBase agentItem = new InventoryItemBase(); 914 InventoryItemBase agentItem = new InventoryItemBase();
915 915
916 agentItem.ID = LLUUID.Random(); 916 agentItem.ID = UUID.Random();
917 agentItem.Creator = taskItem.CreatorID; 917 agentItem.Creator = taskItem.CreatorID;
918 agentItem.Owner = destAgent; 918 agentItem.Owner = destAgent;
919 agentItem.AssetID = taskItem.AssetID; 919 agentItem.AssetID = taskItem.AssetID;
@@ -954,7 +954,7 @@ namespace OpenSim.Region.Environment.Scenes
954 /// <param name="folderID"></param> 954 /// <param name="folderID"></param>
955 /// <param name="part"></param> 955 /// <param name="part"></param>
956 /// <param name="itemID"></param> 956 /// <param name="itemID"></param>
957 public void MoveTaskInventoryItem(IClientAPI remoteClient, LLUUID folderId, SceneObjectPart part, LLUUID itemId) 957 public void MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId)
958 { 958 {
959 959
960 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId); 960 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId);
@@ -970,7 +970,7 @@ namespace OpenSim.Region.Environment.Scenes
970 /// <param name="folderID"></param> 970 /// <param name="folderID"></param>
971 /// <param name="primLocalID"></param> 971 /// <param name="primLocalID"></param>
972 /// <param name="itemID"></param> 972 /// <param name="itemID"></param>
973 public void ClientMoveTaskInventoryItem(IClientAPI remoteClient, LLUUID folderId, uint primLocalId, LLUUID itemId) 973 public void ClientMoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, uint primLocalId, UUID itemId)
974 { 974 {
975 SceneObjectPart part = GetSceneObjectPart(primLocalId); 975 SceneObjectPart part = GetSceneObjectPart(primLocalId);
976 976
@@ -1009,7 +1009,7 @@ namespace OpenSim.Region.Environment.Scenes
1009 /// <param name="folderID"></param> 1009 /// <param name="folderID"></param>
1010 /// <param name="part"></param> 1010 /// <param name="part"></param>
1011 /// <param name="itemID"></param> 1011 /// <param name="itemID"></param>
1012 public void MoveTaskInventoryItem(LLUUID avatarId, LLUUID folderId, SceneObjectPart part, LLUUID itemId) 1012 public void MoveTaskInventoryItem(UUID avatarId, UUID folderId, SceneObjectPart part, UUID itemId)
1013 { 1013 {
1014 ScenePresence avatar; 1014 ScenePresence avatar;
1015 1015
@@ -1040,7 +1040,7 @@ namespace OpenSim.Region.Environment.Scenes
1040 /// <param name="destId"></param> 1040 /// <param name="destId"></param>
1041 /// <param name="part"></param> 1041 /// <param name="part"></param>
1042 /// <param name="itemId"></param> 1042 /// <param name="itemId"></param>
1043 public void MoveTaskInventoryItem(LLUUID destId, SceneObjectPart part, LLUUID itemId) 1043 public void MoveTaskInventoryItem(UUID destId, SceneObjectPart part, UUID itemId)
1044 { 1044 {
1045 TaskInventoryItem srcTaskItem = part.GetInventoryItem(itemId); 1045 TaskInventoryItem srcTaskItem = part.GetInventoryItem(itemId);
1046 1046
@@ -1065,7 +1065,7 @@ namespace OpenSim.Region.Environment.Scenes
1065 return; 1065 return;
1066 } 1066 }
1067 1067
1068 if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.AllowInventoryDrop) == 0) 1068 if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) == 0)
1069 { 1069 {
1070 // object cannot copy items to an object owned by a different owner 1070 // object cannot copy items to an object owned by a different owner
1071 // unless llAllowInventoryDrop has been called 1071 // unless llAllowInventoryDrop has been called
@@ -1081,7 +1081,7 @@ namespace OpenSim.Region.Environment.Scenes
1081 1081
1082 TaskInventoryItem destTaskItem = new TaskInventoryItem(); 1082 TaskInventoryItem destTaskItem = new TaskInventoryItem();
1083 1083
1084 destTaskItem.ItemID = LLUUID.Random(); 1084 destTaskItem.ItemID = UUID.Random();
1085 destTaskItem.CreatorID = srcTaskItem.CreatorID; 1085 destTaskItem.CreatorID = srcTaskItem.CreatorID;
1086 destTaskItem.AssetID = srcTaskItem.AssetID; 1086 destTaskItem.AssetID = srcTaskItem.AssetID;
1087 destTaskItem.GroupID = destPart.GroupID; 1087 destTaskItem.GroupID = destPart.GroupID;
@@ -1130,7 +1130,7 @@ namespace OpenSim.Region.Environment.Scenes
1130 } 1130 }
1131 } 1131 }
1132 1132
1133 public void MoveTaskInventoryItems(LLUUID destID, string category, SceneObjectPart host, List<LLUUID> items) 1133 public void MoveTaskInventoryItems(UUID destID, string category, SceneObjectPart host, List<UUID> items)
1134 { 1134 {
1135 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID); 1135 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID);
1136 if (profile == null || profile.RootFolder == null) 1136 if (profile == null || profile.RootFolder == null)
@@ -1142,11 +1142,11 @@ namespace OpenSim.Region.Environment.Scenes
1142 return; 1142 return;
1143 } 1143 }
1144 1144
1145 LLUUID newFolderID = LLUUID.Random(); 1145 UUID newFolderID = UUID.Random();
1146 1146
1147 profile.CreateFolder(category, newFolderID, 0xffff, profile.RootFolder.ID); 1147 profile.CreateFolder(category, newFolderID, 0xffff, profile.RootFolder.ID);
1148 1148
1149 foreach (LLUUID itemID in items) 1149 foreach (UUID itemID in items)
1150 { 1150 {
1151 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(destID, host, itemID); 1151 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(destID, host, itemID);
1152 agentItem.Folder = newFolderID; 1152 agentItem.Folder = newFolderID;
@@ -1167,16 +1167,16 @@ namespace OpenSim.Region.Environment.Scenes
1167 1167
1168 /// <summary> 1168 /// <summary>
1169 /// Update an item in a prim (task) inventory. 1169 /// Update an item in a prim (task) inventory.
1170 /// This method does not handle scripts, <see>RezScript(IClientAPI, LLUUID, unit)</see> 1170 /// This method does not handle scripts, <see>RezScript(IClientAPI, UUID, unit)</see>
1171 /// </summary> 1171 /// </summary>
1172 /// <param name="remoteClient"></param> 1172 /// <param name="remoteClient"></param>
1173 /// <param name="transactionID"></param> 1173 /// <param name="transactionID"></param>
1174 /// <param name="itemInfo"></param> 1174 /// <param name="itemInfo"></param>
1175 /// <param name="primLocalID"></param> 1175 /// <param name="primLocalID"></param>
1176 public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID transactionID, TaskInventoryItem itemInfo, 1176 public void UpdateTaskInventory(IClientAPI remoteClient, UUID transactionID, TaskInventoryItem itemInfo,
1177 uint primLocalID) 1177 uint primLocalID)
1178 { 1178 {
1179 LLUUID itemID = itemInfo.ItemID; 1179 UUID itemID = itemInfo.ItemID;
1180 1180
1181 // Find the prim we're dealing with 1181 // Find the prim we're dealing with
1182 SceneObjectPart part = GetSceneObjectPart(primLocalID); 1182 SceneObjectPart part = GetSceneObjectPart(primLocalID);
@@ -1193,8 +1193,8 @@ namespace OpenSim.Region.Environment.Scenes
1193 1193
1194 if (currentItem == null) 1194 if (currentItem == null)
1195 { 1195 {
1196 LLUUID copyID = LLUUID.Random(); 1196 UUID copyID = UUID.Random();
1197 if (itemID != LLUUID.Zero) 1197 if (itemID != UUID.Zero)
1198 { 1198 {
1199 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 1199 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
1200 1200
@@ -1254,12 +1254,12 @@ namespace OpenSim.Region.Environment.Scenes
1254 /// <param name="remoteClient"></param> 1254 /// <param name="remoteClient"></param>
1255 /// <param name="itemID"> </param> 1255 /// <param name="itemID"> </param>
1256 /// <param name="localID"></param> 1256 /// <param name="localID"></param>
1257 public void RezScript(IClientAPI remoteClient, InventoryItemBase itemBase, LLUUID transactionID, uint localID) 1257 public void RezScript(IClientAPI remoteClient, InventoryItemBase itemBase, UUID transactionID, uint localID)
1258 { 1258 {
1259 LLUUID itemID=itemBase.ID; 1259 UUID itemID=itemBase.ID;
1260 LLUUID copyID = LLUUID.Random(); 1260 UUID copyID = UUID.Random();
1261 1261
1262 if (itemID != LLUUID.Zero) 1262 if (itemID != UUID.Zero)
1263 { 1263 {
1264 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 1264 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
1265 1265
@@ -1344,7 +1344,7 @@ namespace OpenSim.Region.Environment.Scenes
1344 taskItem.GroupID = itemBase.GroupID; 1344 taskItem.GroupID = itemBase.GroupID;
1345 taskItem.GroupPermissions = 0; 1345 taskItem.GroupPermissions = 0;
1346 taskItem.Flags = itemBase.Flags; 1346 taskItem.Flags = itemBase.Flags;
1347 taskItem.PermsGranter = LLUUID.Zero; 1347 taskItem.PermsGranter = UUID.Zero;
1348 taskItem.PermsMask = 0; 1348 taskItem.PermsMask = 0;
1349 taskItem.AssetID = asset.ID; 1349 taskItem.AssetID = asset.ID;
1350 1350
@@ -1361,7 +1361,7 @@ namespace OpenSim.Region.Environment.Scenes
1361 /// <param name="remoteClient"></param> 1361 /// <param name="remoteClient"></param>
1362 /// <param name="itemID"> </param> 1362 /// <param name="itemID"> </param>
1363 /// <param name="localID"></param> 1363 /// <param name="localID"></param>
1364 public void RezScript(LLUUID srcId, SceneObjectPart srcPart, LLUUID destId, int pin, int running, int start_param) 1364 public void RezScript(UUID srcId, SceneObjectPart srcPart, UUID destId, int pin, int running, int start_param)
1365 { 1365 {
1366 TaskInventoryItem srcTaskItem = srcPart.GetInventoryItem(srcId); 1366 TaskInventoryItem srcTaskItem = srcPart.GetInventoryItem(srcId);
1367 1367
@@ -1407,7 +1407,7 @@ namespace OpenSim.Region.Environment.Scenes
1407 1407
1408 TaskInventoryItem destTaskItem = new TaskInventoryItem(); 1408 TaskInventoryItem destTaskItem = new TaskInventoryItem();
1409 1409
1410 destTaskItem.ItemID = LLUUID.Random(); 1410 destTaskItem.ItemID = UUID.Random();
1411 destTaskItem.CreatorID = srcTaskItem.CreatorID; 1411 destTaskItem.CreatorID = srcTaskItem.CreatorID;
1412 destTaskItem.AssetID = srcTaskItem.AssetID; 1412 destTaskItem.AssetID = srcTaskItem.AssetID;
1413 destTaskItem.GroupID = destPart.GroupID; 1413 destTaskItem.GroupID = destPart.GroupID;
@@ -1467,7 +1467,7 @@ namespace OpenSim.Region.Environment.Scenes
1467 { 1467 {
1468 DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) packet; 1468 DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) packet;
1469 1469
1470 LLUUID folderID = LLUUID.Zero; 1470 UUID folderID = UUID.Zero;
1471 1471
1472 foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) 1472 foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData)
1473 { 1473 {
@@ -1598,7 +1598,7 @@ namespace OpenSim.Region.Environment.Scenes
1598 return false; 1598 return false;
1599 } 1599 }
1600 1600
1601 private void DeleteToInventory(DeRezObjectPacket DeRezPacket, EntityBase selectedEnt, IClientAPI remoteClient, SceneObjectGroup objectGroup, LLUUID folderID, bool permissionToDelete) 1601 private void DeleteToInventory(DeRezObjectPacket DeRezPacket, EntityBase selectedEnt, IClientAPI remoteClient, SceneObjectGroup objectGroup, UUID folderID, bool permissionToDelete)
1602 { 1602 {
1603 string sceneObjectXml = objectGroup.ToXmlString(); 1603 string sceneObjectXml = objectGroup.ToXmlString();
1604 1604
@@ -1616,7 +1616,7 @@ namespace OpenSim.Region.Environment.Scenes
1616 // If we're deleting someone else's item, it goes back to their deleted items folder 1616 // If we're deleting someone else's item, it goes back to their deleted items folder
1617 // If we're returning someone's item, it goes back to the owner's Lost And Found folder. 1617 // If we're returning someone's item, it goes back to the owner's Lost And Found folder.
1618 1618
1619 if (DeRezPacket.AgentBlock.DestinationID == LLUUID.Zero || (DeRezPacket.AgentBlock.Destination == 6 && objectGroup.OwnerID != remoteClient.AgentId)) 1619 if (DeRezPacket.AgentBlock.DestinationID == UUID.Zero || (DeRezPacket.AgentBlock.Destination == 6 && objectGroup.OwnerID != remoteClient.AgentId))
1620 { 1620 {
1621 List<InventoryFolderBase> subrootfolders = userInfo.RootFolder.RequestListOfFolders(); 1621 List<InventoryFolderBase> subrootfolders = userInfo.RootFolder.RequestListOfFolders();
1622 foreach (InventoryFolderBase flder in subrootfolders) 1622 foreach (InventoryFolderBase flder in subrootfolders)
@@ -1628,7 +1628,7 @@ namespace OpenSim.Region.Environment.Scenes
1628 } 1628 }
1629 } 1629 }
1630 1630
1631 if (folderID == LLUUID.Zero) 1631 if (folderID == UUID.Zero)
1632 { 1632 {
1633 folderID = userInfo.RootFolder.ID; 1633 folderID = userInfo.RootFolder.ID;
1634 } 1634 }
@@ -1643,7 +1643,7 @@ namespace OpenSim.Region.Environment.Scenes
1643 ((SceneObjectGroup) selectedEnt).GetPartName(selectedEnt.LocalId), 1643 ((SceneObjectGroup) selectedEnt).GetPartName(selectedEnt.LocalId),
1644 ((SceneObjectGroup) selectedEnt).GetPartDescription(selectedEnt.LocalId), 1644 ((SceneObjectGroup) selectedEnt).GetPartDescription(selectedEnt.LocalId),
1645 (sbyte)AssetType.Object, 1645 (sbyte)AssetType.Object,
1646 Helpers.StringToField(sceneObjectXml)); 1646 Utils.StringToBytes(sceneObjectXml));
1647 AssetCache.AddAsset(asset); 1647 AssetCache.AddAsset(asset);
1648 1648
1649 InventoryItemBase item = new InventoryItemBase(); 1649 InventoryItemBase item = new InventoryItemBase();
@@ -1654,7 +1654,7 @@ namespace OpenSim.Region.Environment.Scenes
1654 else // Delete / Return 1654 else // Delete / Return
1655 item.Owner = objectGroup.OwnerID; 1655 item.Owner = objectGroup.OwnerID;
1656 1656
1657 item.ID = LLUUID.Random(); 1657 item.ID = UUID.Random();
1658 item.AssetID = asset.FullID; 1658 item.AssetID = asset.FullID;
1659 item.Description = asset.Description; 1659 item.Description = asset.Description;
1660 item.Name = asset.Name; 1660 item.Name = asset.Name;
@@ -1709,7 +1709,7 @@ namespace OpenSim.Region.Environment.Scenes
1709 DeleteSceneObject(objectGroup); 1709 DeleteSceneObject(objectGroup);
1710 } 1710 }
1711 1711
1712 public void updateKnownAsset(IClientAPI remoteClient, SceneObjectGroup grp, LLUUID assetID, LLUUID agentID) 1712 public void updateKnownAsset(IClientAPI remoteClient, SceneObjectGroup grp, UUID assetID, UUID agentID)
1713 { 1713 {
1714 SceneObjectGroup objectGroup = grp; 1714 SceneObjectGroup objectGroup = grp;
1715 if (objectGroup != null) 1715 if (objectGroup != null)
@@ -1723,7 +1723,7 @@ namespace OpenSim.Region.Environment.Scenes
1723 Queue<InventoryFolderImpl> searchfolders = new Queue<InventoryFolderImpl>(); 1723 Queue<InventoryFolderImpl> searchfolders = new Queue<InventoryFolderImpl>();
1724 searchfolders.Enqueue(userInfo.RootFolder); 1724 searchfolders.Enqueue(userInfo.RootFolder);
1725 1725
1726 LLUUID foundFolder = userInfo.RootFolder.ID; 1726 UUID foundFolder = userInfo.RootFolder.ID;
1727 1727
1728 // search through folders to find the asset. 1728 // search through folders to find the asset.
1729 while (searchfolders.Count > 0) 1729 while (searchfolders.Count > 0)
@@ -1754,7 +1754,7 @@ namespace OpenSim.Region.Environment.Scenes
1754 objectGroup.GetPartName(objectGroup.LocalId), 1754 objectGroup.GetPartName(objectGroup.LocalId),
1755 objectGroup.GetPartDescription(objectGroup.LocalId), 1755 objectGroup.GetPartDescription(objectGroup.LocalId),
1756 (sbyte)AssetType.Object, 1756 (sbyte)AssetType.Object,
1757 Helpers.StringToField(sceneObjectXml)); 1757 Utils.StringToBytes(sceneObjectXml));
1758 AssetCache.AddAsset(asset); 1758 AssetCache.AddAsset(asset);
1759 1759
1760 InventoryItemBase item = new InventoryItemBase(); 1760 InventoryItemBase item = new InventoryItemBase();
@@ -1797,7 +1797,7 @@ namespace OpenSim.Region.Environment.Scenes
1797 } 1797 }
1798 } 1798 }
1799 1799
1800 public LLUUID attachObjectAssetStore(IClientAPI remoteClient, SceneObjectGroup grp, LLUUID AgentId) 1800 public UUID attachObjectAssetStore(IClientAPI remoteClient, SceneObjectGroup grp, UUID AgentId)
1801 { 1801 {
1802 SceneObjectGroup objectGroup = grp; 1802 SceneObjectGroup objectGroup = grp;
1803 if (objectGroup != null) 1803 if (objectGroup != null)
@@ -1812,13 +1812,13 @@ namespace OpenSim.Region.Environment.Scenes
1812 objectGroup.GetPartName(objectGroup.LocalId), 1812 objectGroup.GetPartName(objectGroup.LocalId),
1813 objectGroup.GetPartDescription(objectGroup.LocalId), 1813 objectGroup.GetPartDescription(objectGroup.LocalId),
1814 (sbyte)AssetType.Object, 1814 (sbyte)AssetType.Object,
1815 Helpers.StringToField(sceneObjectXml)); 1815 Utils.StringToBytes(sceneObjectXml));
1816 AssetCache.AddAsset(asset); 1816 AssetCache.AddAsset(asset);
1817 1817
1818 InventoryItemBase item = new InventoryItemBase(); 1818 InventoryItemBase item = new InventoryItemBase();
1819 item.Creator = objectGroup.RootPart.CreatorID; 1819 item.Creator = objectGroup.RootPart.CreatorID;
1820 item.Owner = remoteClient.AgentId; 1820 item.Owner = remoteClient.AgentId;
1821 item.ID = LLUUID.Random(); 1821 item.ID = UUID.Random();
1822 item.AssetID = asset.FullID; 1822 item.AssetID = asset.FullID;
1823 item.Description = asset.Description; 1823 item.Description = asset.Description;
1824 item.Name = asset.Name; 1824 item.Name = asset.Name;
@@ -1848,9 +1848,9 @@ namespace OpenSim.Region.Environment.Scenes
1848 remoteClient.SendInventoryItemCreateUpdate(item); 1848 remoteClient.SendInventoryItemCreateUpdate(item);
1849 return item.AssetID; 1849 return item.AssetID;
1850 } 1850 }
1851 return LLUUID.Zero; 1851 return UUID.Zero;
1852 } 1852 }
1853 return LLUUID.Zero; 1853 return UUID.Zero;
1854 1854
1855 } 1855 }
1856 1856
@@ -1872,10 +1872,10 @@ namespace OpenSim.Region.Environment.Scenes
1872 /// <param name="RezSelected"></param> 1872 /// <param name="RezSelected"></param>
1873 /// <param name="RemoveItem"></param> 1873 /// <param name="RemoveItem"></param>
1874 /// <param name="fromTaskID"></param> 1874 /// <param name="fromTaskID"></param>
1875 public virtual void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart, 1875 public virtual void RezObject(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart,
1876 LLUUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, 1876 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
1877 uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags, 1877 uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags,
1878 bool RezSelected, bool RemoveItem, LLUUID fromTaskID) 1878 bool RezSelected, bool RemoveItem, UUID fromTaskID)
1879 { 1879 {
1880 RezObject( 1880 RezObject(
1881 remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection, 1881 remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection,
@@ -1901,10 +1901,10 @@ namespace OpenSim.Region.Environment.Scenes
1901 /// <param name="fromTaskID"></param> 1901 /// <param name="fromTaskID"></param>
1902 /// <param name="difference"></param> 1902 /// <param name="difference"></param>
1903 /// <returns></returns> 1903 /// <returns></returns>
1904 public virtual SceneObjectGroup RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart, 1904 public virtual SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart,
1905 LLUUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, 1905 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
1906 uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags, 1906 uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags,
1907 bool RezSelected, bool RemoveItem, LLUUID fromTaskID, bool attachment) 1907 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
1908 { 1908 {
1909 // Work out position details 1909 // Work out position details
1910 byte bRayEndIsIntersection = (byte)0; 1910 byte bRayEndIsIntersection = (byte)0;
@@ -1918,11 +1918,11 @@ namespace OpenSim.Region.Environment.Scenes
1918 bRayEndIsIntersection = (byte)0; 1918 bRayEndIsIntersection = (byte)0;
1919 } 1919 }
1920 1920
1921 LLVector3 scale = new LLVector3(0.5f, 0.5f, 0.5f); 1921 Vector3 scale = new Vector3(0.5f, 0.5f, 0.5f);
1922 1922
1923 1923
1924 LLVector3 pos = GetNewRezLocation( 1924 Vector3 pos = GetNewRezLocation(
1925 RayStart, RayEnd, RayTargetID, new LLQuaternion(0, 0, 0, 1), 1925 RayStart, RayEnd, RayTargetID, Quaternion.Identity,
1926 BypassRayCast, bRayEndIsIntersection,true,scale, false); 1926 BypassRayCast, bRayEndIsIntersection,true,scale, false);
1927 1927
1928 // Rez object 1928 // Rez object
@@ -1939,7 +1939,7 @@ namespace OpenSim.Region.Environment.Scenes
1939 1939
1940 if (rezAsset != null) 1940 if (rezAsset != null)
1941 { 1941 {
1942 string xmlData = Helpers.FieldToUTF8String(rezAsset.Data); 1942 string xmlData = Utils.BytesToString(rezAsset.Data);
1943 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData); 1943 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData);
1944 if (!ExternalChecks.ExternalChecksCanRezObject(group.Children.Count, remoteClient.AgentId, pos) && !attachment) 1944 if (!ExternalChecks.ExternalChecksCanRezObject(group.Children.Count, remoteClient.AgentId, pos) && !attachment)
1945 { 1945 {
@@ -1955,7 +1955,7 @@ namespace OpenSim.Region.Environment.Scenes
1955 if (!attachment) 1955 if (!attachment)
1956 { 1956 {
1957 pos = GetNewRezLocation( 1957 pos = GetNewRezLocation(
1958 RayStart, RayEnd, RayTargetID, new LLQuaternion(0, 0, 0, 1), 1958 RayStart, RayEnd, RayTargetID, Quaternion.Identity,
1959 BypassRayCast, bRayEndIsIntersection, true, group.GroupScale(), false); 1959 BypassRayCast, bRayEndIsIntersection, true, group.GroupScale(), false);
1960 group.AbsolutePosition = pos; 1960 group.AbsolutePosition = pos;
1961 } 1961 }
@@ -2066,18 +2066,18 @@ namespace OpenSim.Region.Environment.Scenes
2066 /// <returns></returns> 2066 /// <returns></returns>
2067 public virtual SceneObjectGroup RezObject( 2067 public virtual SceneObjectGroup RezObject(
2068 SceneObjectPart sourcePart, TaskInventoryItem item, 2068 SceneObjectPart sourcePart, TaskInventoryItem item,
2069 LLVector3 pos, LLQuaternion rot, LLVector3 vel, int param) 2069 Vector3 pos, Quaternion rot, Vector3 vel, int param)
2070 { 2070 {
2071 // Rez object 2071 // Rez object
2072 if (item != null) 2072 if (item != null)
2073 { 2073 {
2074 LLUUID ownerID = item.OwnerID; 2074 UUID ownerID = item.OwnerID;
2075 2075
2076 AssetBase rezAsset = AssetCache.GetAsset(item.AssetID, false); 2076 AssetBase rezAsset = AssetCache.GetAsset(item.AssetID, false);
2077 2077
2078 if (rezAsset != null) 2078 if (rezAsset != null)
2079 { 2079 {
2080 string xmlData = Helpers.FieldToUTF8String(rezAsset.Data); 2080 string xmlData = Utils.BytesToString(rezAsset.Data);
2081 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData); 2081 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData);
2082 2082
2083 if (!ExternalChecks.ExternalChecksCanRezObject(group.Children.Count, ownerID, pos)) 2083 if (!ExternalChecks.ExternalChecksCanRezObject(group.Children.Count, ownerID, pos))
@@ -2154,7 +2154,7 @@ namespace OpenSim.Region.Environment.Scenes
2154 return null; 2154 return null;
2155 } 2155 }
2156 2156
2157 public virtual bool returnObjects(SceneObjectGroup[] returnobjects, LLUUID AgentId) 2157 public virtual bool returnObjects(SceneObjectGroup[] returnobjects, UUID AgentId)
2158 { 2158 {
2159 string message = ""; 2159 string message = "";
2160 if (returnobjects.Length <= 0) 2160 if (returnobjects.Length <= 0)
@@ -2186,7 +2186,7 @@ namespace OpenSim.Region.Environment.Scenes
2186 { 2186 {
2187 if (userInfo.HasReceivedInventory) 2187 if (userInfo.HasReceivedInventory)
2188 { 2188 {
2189 LLUUID folderID = LLUUID.Zero; 2189 UUID folderID = UUID.Zero;
2190 2190
2191 List<InventoryFolderBase> subrootfolders = userInfo.RootFolder.RequestListOfFolders(); 2191 List<InventoryFolderBase> subrootfolders = userInfo.RootFolder.RequestListOfFolders();
2192 foreach (InventoryFolderBase flder in subrootfolders) 2192 foreach (InventoryFolderBase flder in subrootfolders)
@@ -2198,7 +2198,7 @@ namespace OpenSim.Region.Environment.Scenes
2198 } 2198 }
2199 } 2199 }
2200 2200
2201 if (folderID == LLUUID.Zero) 2201 if (folderID == UUID.Zero)
2202 { 2202 {
2203 folderID = userInfo.RootFolder.ID; 2203 folderID = userInfo.RootFolder.ID;
2204 } 2204 }
@@ -2213,13 +2213,13 @@ namespace OpenSim.Region.Environment.Scenes
2213 returnobjects[i].GetPartName(returnobjects[i].LocalId), 2213 returnobjects[i].GetPartName(returnobjects[i].LocalId),
2214 returnobjects[i].GetPartDescription(returnobjects[i].LocalId), 2214 returnobjects[i].GetPartDescription(returnobjects[i].LocalId),
2215 (sbyte)AssetType.Object, 2215 (sbyte)AssetType.Object,
2216 Helpers.StringToField(sceneObjectXml)); 2216 Utils.StringToBytes(sceneObjectXml));
2217 AssetCache.AddAsset(asset); 2217 AssetCache.AddAsset(asset);
2218 2218
2219 InventoryItemBase item = new InventoryItemBase(); 2219 InventoryItemBase item = new InventoryItemBase();
2220 item.Creator = returnobjects[i].RootPart.CreatorID; 2220 item.Creator = returnobjects[i].RootPart.CreatorID;
2221 item.Owner = returnobjects[i].OwnerID; 2221 item.Owner = returnobjects[i].OwnerID;
2222 item.ID = LLUUID.Random(); 2222 item.ID = UUID.Random();
2223 item.AssetID = asset.FullID; 2223 item.AssetID = asset.FullID;
2224 item.Description = asset.Description; 2224 item.Description = asset.Description;
2225 item.Name = asset.Name; 2225 item.Name = asset.Name;
@@ -2295,7 +2295,7 @@ namespace OpenSim.Region.Environment.Scenes
2295 2295
2296 } 2296 }
2297 2297
2298 public void GetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID) 2298 public void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID)
2299 { 2299 {
2300 IScriptModule scriptModule = RequestModuleInterface<IScriptModule>(); 2300 IScriptModule scriptModule = RequestModuleInterface<IScriptModule>();
2301 if (scriptModule == null) 2301 if (scriptModule == null)
@@ -2305,7 +2305,7 @@ namespace OpenSim.Region.Environment.Scenes
2305 scriptModule.GetScriptRunning(objectID, itemID)); 2305 scriptModule.GetScriptRunning(objectID, itemID));
2306 } 2306 }
2307 2307
2308 public void SetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID, bool running) 2308 public void SetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID, bool running)
2309 { 2309 {
2310 SceneObjectPart part = GetSceneObjectPart(objectID); 2310 SceneObjectPart part = GetSceneObjectPart(objectID);
2311 if (part == null) 2311 if (part == null)
@@ -2317,7 +2317,7 @@ namespace OpenSim.Region.Environment.Scenes
2317 EventManager.TriggerStopScript(part.LocalId, itemID); 2317 EventManager.TriggerStopScript(part.LocalId, itemID);
2318 } 2318 }
2319 2319
2320 public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID, 2320 public void RezSingleAttachment(IClientAPI remoteClient, UUID itemID,
2321 uint AttachmentPt, uint ItemFlags, uint NextOwnerMask) 2321 uint AttachmentPt, uint ItemFlags, uint NextOwnerMask)
2322 { 2322 {
2323 SceneObjectGroup att = m_innerScene.RezSingleAttachment(remoteClient, itemID, AttachmentPt, ItemFlags, NextOwnerMask); 2323 SceneObjectGroup att = m_innerScene.RezSingleAttachment(remoteClient, itemID, AttachmentPt, ItemFlags, NextOwnerMask);
@@ -2333,7 +2333,7 @@ namespace OpenSim.Region.Environment.Scenes
2333 } 2333 }
2334 2334
2335 public void RezSingleAttachment(SceneObjectGroup att, 2335 public void RezSingleAttachment(SceneObjectGroup att,
2336 IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt, 2336 IClientAPI remoteClient, UUID itemID, uint AttachmentPt,
2337 uint ItemFlags, uint NextOwnerMask) 2337 uint ItemFlags, uint NextOwnerMask)
2338 { 2338 {
2339 if (att.RootPart != null) 2339 if (att.RootPart != null)
@@ -2352,12 +2352,12 @@ namespace OpenSim.Region.Environment.Scenes
2352 } 2352 }
2353 } 2353 }
2354 2354
2355 public void AttachObject(IClientAPI controllingClient, uint localID, uint attachPoint, LLQuaternion rot, LLVector3 pos) 2355 public void AttachObject(IClientAPI controllingClient, uint localID, uint attachPoint, Quaternion rot, Vector3 pos)
2356 { 2356 {
2357 m_innerScene.AttachObject(controllingClient, localID, attachPoint, rot, pos); 2357 m_innerScene.AttachObject(controllingClient, localID, attachPoint, rot, pos);
2358 } 2358 }
2359 2359
2360 public void DetachSingleAttachmentToInv(LLUUID itemID, IClientAPI remoteClient) 2360 public void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient)
2361 { 2361 {
2362 ScenePresence presence; 2362 ScenePresence presence;
2363 if (TryGetAvatar(remoteClient.AgentId, out presence)) 2363 if (TryGetAvatar(remoteClient.AgentId, out presence))