aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 36ef281..ae5cbff 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -12296,7 +12296,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12296 ItemData.Add(ItemDataMap); 12296 ItemData.Add(ItemDataMap);
12297 } 12297 }
12298 12298
12299 llsd.Add("ItemData", ItemData); 12299 llsd.Add("InventoryData", ItemData);
12300 12300
12301 eq.Enqueue(BuildEvent("RemoveInventoryItem", 12301 eq.Enqueue(BuildEvent("RemoveInventoryItem",
12302 llsd), AgentId); 12302 llsd), AgentId);
@@ -12340,6 +12340,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12340 llsd), AgentId); 12340 llsd), AgentId);
12341 } 12341 }
12342 12342
12343 private byte[] EncodeU32(uint val)
12344 {
12345 byte[] ret = BitConverter.GetBytes(val);
12346 if (BitConverter.IsLittleEndian)
12347 Array.Reverse(ret);
12348 return ret;
12349 }
12350
12343 public void SendBulkUpdateInventory(InventoryFolderBase[] folders, InventoryItemBase[] items) 12351 public void SendBulkUpdateInventory(InventoryFolderBase[] folders, InventoryItemBase[] items)
12344 { 12352 {
12345 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); 12353 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
@@ -12355,6 +12363,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12355 OSDMap AgentDataMap = new OSDMap(1); 12363 OSDMap AgentDataMap = new OSDMap(1);
12356 AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId)); 12364 AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId));
12357 AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId)); 12365 AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId));
12366 AgentDataMap.Add("TransactionID", OSD.FromUUID(UUID.Random()));
12358 12367
12359 OSDArray AgentData = new OSDArray(1); 12368 OSDArray AgentData = new OSDArray(1);
12360 AgentData.Add(AgentDataMap); 12369 AgentData.Add(AgentDataMap);
@@ -12382,10 +12391,47 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12382 foreach (InventoryItemBase item in items) 12391 foreach (InventoryItemBase item in items)
12383 { 12392 {
12384 OSDMap ItemDataMap = new OSDMap(); 12393 OSDMap ItemDataMap = new OSDMap();
12394
12395 ItemDataMap.Add("ItemID", OSD.FromUUID(item.ID));
12396 ItemDataMap.Add("FolderID", OSD.FromUUID(item.Folder));
12397
12398 ItemDataMap.Add("CreatorID", OSD.FromUUID(item.CreatorIdAsUuid));
12399 ItemDataMap.Add("OwnerID", OSD.FromUUID(item.Owner));
12400 ItemDataMap.Add("GroupID", OSD.FromUUID(item.GroupID));
12401 ItemDataMap.Add("BaseMask", OSD.FromBinary(EncodeU32((uint)item.BasePermissions)));
12402 ItemDataMap.Add("OwnerMask", OSD.FromBinary(EncodeU32((uint)item.CurrentPermissions)));
12403 ItemDataMap.Add("GroupMask", OSD.FromBinary(EncodeU32((uint)item.GroupPermissions)));
12404 ItemDataMap.Add("EveryoneMask", OSD.FromBinary(EncodeU32((uint)item.EveryOnePermissions)));
12405 ItemDataMap.Add("NextOwnerMask", OSD.FromBinary(EncodeU32((uint)item.NextPermissions)));
12406 ItemDataMap.Add("GroupOwned", OSD.FromBoolean(item.GroupOwned));
12407 ItemDataMap.Add("AssetID", OSD.FromUUID(item.AssetID));
12408 ItemDataMap.Add("Type", OSD.FromInteger(item.AssetType));
12409 ItemDataMap.Add("InvType", OSD.FromInteger(item.InvType));
12410 ItemDataMap.Add("Flags", OSD.FromBinary(EncodeU32((uint)item.Flags)));
12411 ItemDataMap.Add("SaleType", OSD.FromInteger((byte)item.SaleType));
12412 ItemDataMap.Add("SalePrice", OSD.FromInteger(item.SalePrice));
12413 ItemDataMap.Add("Name", OSD.FromString(item.Name));
12414 ItemDataMap.Add("Description", OSD.FromString(item.Description));
12415 ItemDataMap.Add("CreationDate", OSD.FromInteger(item.CreationDate));
12416
12417 ItemDataMap.Add("CRC", OSD.FromBinary(EncodeU32(
12418 Helpers.InventoryCRC(1000, 0, (sbyte)item.InvType,
12419 (sbyte)item.AssetType, item.AssetID,
12420 item.GroupID, 100,
12421 item.Owner, item.CreatorIdAsUuid,
12422 item.ID, item.Folder,
12423 (uint)PermissionMask.All, 1, (uint)PermissionMask.All, (uint)PermissionMask.All,
12424 (uint)PermissionMask.All)
12425 )));
12426 ItemDataMap.Add("CallbackID", 0);
12427
12385 ItemData.Add(ItemDataMap); 12428 ItemData.Add(ItemDataMap);
12386 } 12429 }
12387 12430
12388 llsd.Add("ItemData", ItemData); 12431 llsd.Add("ItemData", ItemData);
12432
12433 eq.Enqueue(BuildEvent("BulkUpdateInventory",
12434 llsd), AgentId);
12389 } 12435 }
12390 } 12436 }
12391} 12437}