aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs48
1 files changed, 47 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 54fc7f4..1be282a 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -12455,7 +12455,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12455 ItemData.Add(ItemDataMap); 12455 ItemData.Add(ItemDataMap);
12456 } 12456 }
12457 12457
12458 llsd.Add("ItemData", ItemData); 12458 llsd.Add("InventoryData", ItemData);
12459 12459
12460 eq.Enqueue(BuildEvent("RemoveInventoryItem", 12460 eq.Enqueue(BuildEvent("RemoveInventoryItem",
12461 llsd), AgentId); 12461 llsd), AgentId);
@@ -12499,6 +12499,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12499 llsd), AgentId); 12499 llsd), AgentId);
12500 } 12500 }
12501 12501
12502 private byte[] EncodeU32(uint val)
12503 {
12504 byte[] ret = BitConverter.GetBytes(val);
12505 if (BitConverter.IsLittleEndian)
12506 Array.Reverse(ret);
12507 return ret;
12508 }
12509
12502 public void SendBulkUpdateInventory(InventoryFolderBase[] folders, InventoryItemBase[] items) 12510 public void SendBulkUpdateInventory(InventoryFolderBase[] folders, InventoryItemBase[] items)
12503 { 12511 {
12504 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); 12512 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
@@ -12514,6 +12522,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12514 OSDMap AgentDataMap = new OSDMap(1); 12522 OSDMap AgentDataMap = new OSDMap(1);
12515 AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId)); 12523 AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId));
12516 AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId)); 12524 AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId));
12525 AgentDataMap.Add("TransactionID", OSD.FromUUID(UUID.Random()));
12517 12526
12518 OSDArray AgentData = new OSDArray(1); 12527 OSDArray AgentData = new OSDArray(1);
12519 AgentData.Add(AgentDataMap); 12528 AgentData.Add(AgentDataMap);
@@ -12541,10 +12550,47 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12541 foreach (InventoryItemBase item in items) 12550 foreach (InventoryItemBase item in items)
12542 { 12551 {
12543 OSDMap ItemDataMap = new OSDMap(); 12552 OSDMap ItemDataMap = new OSDMap();
12553
12554 ItemDataMap.Add("ItemID", OSD.FromUUID(item.ID));
12555 ItemDataMap.Add("FolderID", OSD.FromUUID(item.Folder));
12556
12557 ItemDataMap.Add("CreatorID", OSD.FromUUID(item.CreatorIdAsUuid));
12558 ItemDataMap.Add("OwnerID", OSD.FromUUID(item.Owner));
12559 ItemDataMap.Add("GroupID", OSD.FromUUID(item.GroupID));
12560 ItemDataMap.Add("BaseMask", OSD.FromBinary(EncodeU32((uint)item.BasePermissions)));
12561 ItemDataMap.Add("OwnerMask", OSD.FromBinary(EncodeU32((uint)item.CurrentPermissions)));
12562 ItemDataMap.Add("GroupMask", OSD.FromBinary(EncodeU32((uint)item.GroupPermissions)));
12563 ItemDataMap.Add("EveryoneMask", OSD.FromBinary(EncodeU32((uint)item.EveryOnePermissions)));
12564 ItemDataMap.Add("NextOwnerMask", OSD.FromBinary(EncodeU32((uint)item.NextPermissions)));
12565 ItemDataMap.Add("GroupOwned", OSD.FromBoolean(item.GroupOwned));
12566 ItemDataMap.Add("AssetID", OSD.FromUUID(item.AssetID));
12567 ItemDataMap.Add("Type", OSD.FromInteger(item.AssetType));
12568 ItemDataMap.Add("InvType", OSD.FromInteger(item.InvType));
12569 ItemDataMap.Add("Flags", OSD.FromBinary(EncodeU32((uint)item.Flags)));
12570 ItemDataMap.Add("SaleType", OSD.FromInteger((byte)item.SaleType));
12571 ItemDataMap.Add("SalePrice", OSD.FromInteger(item.SalePrice));
12572 ItemDataMap.Add("Name", OSD.FromString(item.Name));
12573 ItemDataMap.Add("Description", OSD.FromString(item.Description));
12574 ItemDataMap.Add("CreationDate", OSD.FromInteger(item.CreationDate));
12575
12576 ItemDataMap.Add("CRC", OSD.FromBinary(EncodeU32(
12577 Helpers.InventoryCRC(1000, 0, (sbyte)item.InvType,
12578 (sbyte)item.AssetType, item.AssetID,
12579 item.GroupID, 100,
12580 item.Owner, item.CreatorIdAsUuid,
12581 item.ID, item.Folder,
12582 (uint)PermissionMask.All, 1, (uint)PermissionMask.All, (uint)PermissionMask.All,
12583 (uint)PermissionMask.All)
12584 )));
12585 ItemDataMap.Add("CallbackID", 0);
12586
12544 ItemData.Add(ItemDataMap); 12587 ItemData.Add(ItemDataMap);
12545 } 12588 }
12546 12589
12547 llsd.Add("ItemData", ItemData); 12590 llsd.Add("ItemData", ItemData);
12591
12592 eq.Enqueue(BuildEvent("BulkUpdateInventory",
12593 llsd), AgentId);
12548 } 12594 }
12549 } 12595 }
12550} 12596}