From 8645c7482d39ccc9d72cb4cfc7c68b651b3824d3 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 11 Feb 2009 19:57:45 +0000 Subject: * Change SendBulkUpdateInventory from two methods to one which accepts an InventoryNode --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 26 ++++++++++++++-------- .../Region/Examples/SimpleModule/MyNpcCharacter.cs | 6 +---- .../Region/OptionalModules/World/NPC/NPCAvatar.cs | 6 +---- 3 files changed, 19 insertions(+), 19 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index a1263a1..45915db 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -1850,9 +1850,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP inventoryReply.Header.Zerocoded = true; OutPacket(inventoryReply, ThrottleOutPacketType.Asset); } - - /// IClientAPI.SendBulkUpdateInventory(InventoryFolderBase) - public void SendBulkUpdateInventory(InventoryFolderBase folderBase) + + protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase) { // XXX: Nasty temporary move that will be resolved shortly InventoryFolderImpl folder = (InventoryFolderImpl)folderBase; @@ -1863,7 +1862,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP List folderDataBlocks = new List(); - SendBulkUpdateInventoryRecursive(folder, ref folderDataBlocks, transactionId); + SendBulkUpdateInventoryFolderRecursive(folder, ref folderDataBlocks, transactionId); if (folderDataBlocks.Count > 0) { @@ -1888,7 +1887,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// /// - private void SendBulkUpdateInventoryRecursive( + private void SendBulkUpdateInventoryFolderRecursive( InventoryFolderImpl folder, ref List folderDataBlocks, UUID transactionId) { @@ -1934,7 +1933,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP List subFolders = folder.RequestListOfFolderImpls(); foreach (InventoryFolderImpl subFolder in subFolders) { - SendBulkUpdateInventoryRecursive(subFolder, ref folderDataBlocks, transactionId); + SendBulkUpdateInventoryFolderRecursive(subFolder, ref folderDataBlocks, transactionId); } } @@ -1997,9 +1996,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP return itemBlock; } - - /// IClientAPI.SendBulkUpdateInventory(InventoryItemBase) - public void SendBulkUpdateInventory(InventoryItemBase item) + + public void SendBulkUpdateInventory(InventoryNodeBase node) + { + if (node is InventoryItemBase) + SendBulkUpdateInventoryItem((InventoryItemBase)node); + else if (node is InventoryFolderBase) + SendBulkUpdateInventoryFolder((InventoryFolderBase)node); + else + m_log.ErrorFormat("[CLIENT]: Client for {0} sent unknown inventory node named {1}", Name, node.Name); + } + + protected void SendBulkUpdateInventoryItem(InventoryItemBase item) { const uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index aac5990..1ee4424 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -548,13 +548,9 @@ namespace OpenSim.Region.Examples.SimpleModule { } - /// IClientAPI.SendBulkUpdateInventory(InventoryItemBase) - public virtual void SendBulkUpdateInventory(InventoryItemBase item) + public virtual void SendBulkUpdateInventory(InventoryNodeBase node) { } - - public void SendBulkUpdateInventory(InventoryFolderBase folderBase) - {} public UUID GetDefaultAnimation(string name) { diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 3ba8a97..91518e2 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -636,13 +636,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } - /// IClientAPI.SendBulkUpdateInventory(InventoryItemBase) - public virtual void SendBulkUpdateInventory(InventoryItemBase item) + public virtual void SendBulkUpdateInventory(InventoryNodeBase node) { } - - public virtual void SendBulkUpdateInventory(InventoryFolderBase folderBase) - {} public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) { -- cgit v1.1