From a9cc76e0efba7496909d613c75b81de6a9c5d979 Mon Sep 17 00:00:00 2001
From: Teravus Ovares
Date: Wed, 30 Apr 2008 16:08:24 +0000
Subject: * Long awaited patch from A_Biondi Mantis 923. Kept alive by
Melanie. Thanks A_Biondi and Melanie! * This builds but might not work.
JustinCC will examine.. it may work out of the box.
---
.../Region/Environment/Scenes/Scene.Inventory.cs | 33 ++++++++++++++++++----
1 file changed, 28 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index d41ede1..7e1b89f 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -260,9 +260,11 @@ namespace OpenSim.Region.Environment.Scenes
/// The name of the updated item
/// The description of the updated item
/// The permissions of the updated item
- public void UpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID transactionID,
+/* public void UpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID transactionID,
LLUUID itemID, string name, string description,
- uint nextOwnerMask)
+ uint nextOwnerMask)*/
+ public void UpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID transactionID,
+ LLUUID itemID, InventoryItemBase itemUpd)
{
CachedUserInfo userInfo
= CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
@@ -275,9 +277,22 @@ namespace OpenSim.Region.Environment.Scenes
{
if (LLUUID.Zero == transactionID)
{
- item.Name = name;
- item.Description = description;
- item.NextPermissions = nextOwnerMask;
+ item.Name = itemUpd.Name;
+ item.Description = itemUpd.Description;
+ item.NextPermissions = itemUpd.NextPermissions;
+ item.EveryOnePermissions = itemUpd.EveryOnePermissions;
+
+ // TODO: Requires sanity checks
+ //item.GroupID = itemUpd.GroupID;
+ //item.GroupOwned = itemUpd.GroupOwned;
+ //item.CreationDate = itemUpd.CreationDate;
+
+ // TODO: Check if folder changed and move item
+ //item.NextPermissions = itemUpd.Folder;
+ item.InvType = itemUpd.InvType;
+ item.SalePrice = itemUpd.SalePrice;
+ item.SaleType = itemUpd.SaleType;
+ item.Flags = itemUpd.Flags;
userInfo.UpdateItem(remoteClient.AgentId, item);
}
@@ -351,6 +366,12 @@ namespace OpenSim.Region.Environment.Scenes
itemCopy.BasePermissions = item.BasePermissions;
itemCopy.CurrentPermissions = item.CurrentPermissions;
+ itemCopy.GroupID = item.GroupID;
+ itemCopy.GroupOwned = item.GroupOwned;
+ itemCopy.Flags = item.Flags;
+ itemCopy.SalePrice = item.SalePrice;
+ itemCopy.SaleType = item.SaleType;
+
recipientUserInfo.AddItem(recipientClient.AgentId, itemCopy);
// Let the recipient client know about this new item
@@ -988,6 +1009,8 @@ namespace OpenSim.Region.Environment.Scenes
item.NextPermissions = objectGroup.RootPart.NextOwnerMask;
}
+ // TODO: add the new fields (Flags, Sale info, etc)
+
userInfo.AddItem(remoteClient.AgentId, item);
remoteClient.SendInventoryItemCreateUpdate(item);
}
--
cgit v1.1