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